diff gui/interface.c @ 36779:f5320e43d458

Simplify code. Use a variable and cast once.
author ib
date Mon, 17 Feb 2014 14:33:03 +0000
parents 0da6c7ff95d2
children c659d33157e3
line wrap: on
line diff
--- a/gui/interface.c	Mon Feb 17 13:57:24 2014 +0000
+++ b/gui/interface.c	Mon Feb 17 14:33:03 2014 +0000
@@ -319,7 +319,7 @@
 #ifdef CONFIG_DVDREAD
     dvd_priv_t *dvd;
 #endif
-    int msg, state;
+    int idata = (intptr_t)data, msg, state;
     stream_t *stream = NULL;
     sh_audio_t *sh_audio;
     mixer_t *mixer;
@@ -333,12 +333,12 @@
 
     case GUI_SET_STATE:
 
-        switch ((intptr_t)data) {
+        switch (idata) {
         case GUI_STOP:
         case GUI_PLAY:
 // if ( !gtkShowVideoWindow ) wsWindowVisibility( &guiApp.videoWindow,wsHideWindow );
         case GUI_PAUSE:
-            guiInfo.Playing = (intptr_t)data;
+            guiInfo.Playing = idata;
             break;
         }
 
@@ -360,9 +360,9 @@
 
     case GUI_RUN_COMMAND:
 
-        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", (int)(intptr_t)data);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_COMMAND: %d\n", idata);
 
-        switch ((intptr_t)data) {
+        switch (idata) {
         case MP_CMD_VO_FULLSCREEN:
             uiEvent(evFullScreen, True);
             break;