summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2017-08-13 23:21:39 +0200
committerCedric BAIL <cedric@osg.samsung.com>2017-08-14 10:16:59 -0700
commitc2abb9a946e7a847fcc2d953c9af9cf228871053 (patch)
treeab222d62c9dff27dddcae72cb6de16b406aff685 /src/modules/ecore_evas
parent15108ecad0350f8d1852c57fd8baede532621778 (diff)
ecore_evas: win32 module - fix possibly uninitialized variables
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/modules/ecore_evas')
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index 3b87959..bdf0a48 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -920,7 +920,7 @@ _ecore_evas_win32_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj,
920} 920}
921 921
922static void 922static void
923_ecore_evas_win32_object_cursor_unset(Ecore_Evas *ee) 923_ecore_evas_win32_object_cursor_unset(Ecore_Evas *ee EINA_UNUSED)
924{ 924{
925 ecore_win32_cursor_show(EINA_TRUE); 925 ecore_win32_cursor_show(EINA_TRUE);
926} 926}
@@ -1114,7 +1114,7 @@ _ecore_evas_win32_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int
1114{ 1114{
1115 Eina_Iterator *iter; 1115 Eina_Iterator *iter;
1116 Ecore_Win32_Monitor *ewm; 1116 Ecore_Win32_Monitor *ewm;
1117 Ecore_Win32_Monitor *m; 1117 Ecore_Win32_Monitor *m = NULL;
1118 unsigned int dist; 1118 unsigned int dist;
1119 int lx; 1119 int lx;
1120 int ly; 1120 int ly;
@@ -1143,6 +1143,20 @@ _ecore_evas_win32_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int
1143 } 1143 }
1144 eina_iterator_free(iter); 1144 eina_iterator_free(iter);
1145 1145
1146 if (!m)
1147 {
1148 HDC dc;
1149
1150 if (x) *x = 0;
1151 if (y) *y = 0;
1152 dc = GetDC(NULL);
1153 if (w) *w = GetDeviceCaps(dc, HORZRES);
1154 if (h) *h = GetDeviceCaps(dc, VERTRES);
1155 ReleaseDC(NULL, dc);
1156
1157 return;
1158 }
1159
1146 if (x) 1160 if (x)
1147 *x = m->desktop.x; 1161 *x = m->desktop.x;
1148 if (y) 1162 if (y)
@@ -1159,7 +1173,7 @@ _ecore_evas_win32_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
1159 Eina_Iterator *iter; 1173 Eina_Iterator *iter;
1160 Ecore_Win32_Monitor *ewm; 1174 Ecore_Win32_Monitor *ewm;
1161 unsigned int dist; 1175 unsigned int dist;
1162 int x_dpi; 1176 int x_dpi = -1;
1163 int y_dpi; 1177 int y_dpi;
1164 int lx; 1178 int lx;
1165 int ly; 1179 int ly;
@@ -1189,6 +1203,16 @@ _ecore_evas_win32_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
1189 } 1203 }
1190 eina_iterator_free(iter); 1204 eina_iterator_free(iter);
1191 1205
1206 if (x_dpi == -1)
1207 {
1208 HDC dc;
1209
1210 dc = GetDC(NULL);
1211 x_dpi = GetDeviceCaps(dc, LOGPIXELSX);
1212 y_dpi = GetDeviceCaps(dc, LOGPIXELSY);
1213 ReleaseDC(NULL, dc);
1214 }
1215
1192 if (xdpi) 1216 if (xdpi)
1193 *xdpi = x_dpi; 1217 *xdpi = x_dpi;
1194 if (ydpi) 1218 if (ydpi)