Commit b4f0a356 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Add a function to fetch the DPI of the device

parent 59bd81ed
...@@ -51,6 +51,7 @@ struct application { ...@@ -51,6 +51,7 @@ struct application {
}; };
static tizen_version system_version; /* Tizen system version */ static tizen_version system_version; /* Tizen system version */
static int screen_dpi;
static void app_terminate(void *data); static void app_terminate(void *data);
void void
...@@ -72,6 +73,12 @@ initialize_system_info() ...@@ -72,6 +73,12 @@ initialize_system_info()
{ {
system_version = TIZEN_VERSION_UNKNOWN; system_version = TIZEN_VERSION_UNKNOWN;
} }
system_info_get_platform_int("tizen.org/feature/screen.dpi", &screen_dpi);
if (ret == SYSTEM_INFO_ERROR_NONE)
{
LOGD("DPI: %d", screen_dpi);
}
} }
tizen_version tizen_version
...@@ -80,6 +87,15 @@ application_get_system_version() ...@@ -80,6 +87,15 @@ application_get_system_version()
return system_version; return system_version;
} }
int
application_get_dpi()
{
// Reference:
// Z1: 233
// Z3: 294
return screen_dpi;
}
static bool static bool
app_create(void *data) app_create(void *data)
{ {
......
...@@ -64,6 +64,9 @@ application_get_playback_service(application *app); ...@@ -64,6 +64,9 @@ application_get_playback_service(application *app);
tizen_version tizen_version
application_get_system_version(); application_get_system_version();
int
application_get_dpi();
interface * interface *
application_get_interface(application *app); application_get_interface(application *app);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment