Mercurial > mplayer.hg
comparison gui/interface.c @ 33768:cee9987bc81d
Remove guiExit().
Integrate it into mplayer().
author | ib |
---|---|
date | Sat, 09 Jul 2011 10:23:47 +0000 |
parents | 515a3b5f291e |
children | 6e774a02d00c |
comparison
equal
deleted
inserted
replaced
33767:690c9b35f4d1 | 33768:cee9987bc81d |
---|---|
43 #include "libmpcodecs/vd.h" | 43 #include "libmpcodecs/vd.h" |
44 #include "libmpcodecs/vf.h" | 44 #include "libmpcodecs/vf.h" |
45 #include "libvo/video_out.h" | 45 #include "libvo/video_out.h" |
46 #include "libvo/x11_common.h" | 46 #include "libvo/x11_common.h" |
47 #include "mixer.h" | 47 #include "mixer.h" |
48 #include "mp_core.h" | |
48 #include "mp_msg.h" | 49 #include "mp_msg.h" |
49 #include "mpcommon.h" | 50 #include "mpcommon.h" |
50 #include "mplayer.h" | 51 #include "mplayer.h" |
51 #include "path.h" | 52 #include "path.h" |
52 #include "sub/font_load.h" | 53 #include "sub/font_load.h" |
121 } | 122 } |
122 | 123 |
123 switch (i) { | 124 switch (i) { |
124 case -1: | 125 case -1: |
125 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName); | 126 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName); |
126 guiExit(EXIT_ERROR); | 127 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
127 | 128 |
128 case -2: | 129 case -2: |
129 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgError, skinName); | 130 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgError, skinName); |
130 guiExit(EXIT_ERROR); | 131 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
131 } | 132 } |
132 | 133 |
133 // initialize windows | 134 // initialize windows |
134 | 135 |
135 mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize); | 136 mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize); |
136 | 137 |
137 if (!mainDrawBuffer) { | 138 if (!mainDrawBuffer) { |
138 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); | 139 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); |
139 guiExit(EXIT_ERROR); | 140 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
140 } | 141 } |
141 | 142 |
142 if (gui_save_pos) { | 143 if (gui_save_pos) { |
143 if (gui_main_pos_x != -3) | 144 if (gui_main_pos_x != -3) |
144 guiApp.main.x = gui_main_pos_x; | 145 guiApp.main.x = gui_main_pos_x; |
489 } | 490 } |
490 } | 491 } |
491 | 492 |
492 if (!video_driver_list && !video_driver_list[0]) { | 493 if (!video_driver_list && !video_driver_list[0]) { |
493 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD); | 494 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD); |
494 guiExit(EXIT_ERROR); | 495 mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0); |
495 } | 496 } |
496 | 497 |
497 { | 498 { |
498 int i = 0; | 499 int i = 0; |
499 | 500 |
1078 } | 1079 } |
1079 } | 1080 } |
1080 | 1081 |
1081 break; | 1082 break; |
1082 } | 1083 } |
1084 | |
1085 case MPLAYER_EXIT_GUI: | |
1086 exit_player_with_rc((enum exit_reason)fparam, (enum exit_reason)fparam >= EXIT_ERROR); | |
1087 break; | |
1083 } | 1088 } |
1084 } | 1089 } |
1085 | 1090 |
1086 void mplayerLoadFont(void) | 1091 void mplayerLoadFont(void) |
1087 { | 1092 { |
1177 sub_name[0] = strdup(name); // sub_name[0] will be read | 1182 sub_name[0] = strdup(name); // sub_name[0] will be read |
1178 sub_name[1] = NULL; | 1183 sub_name[1] = NULL; |
1179 } | 1184 } |
1180 | 1185 |
1181 update_set_of_subtitles(); | 1186 update_set_of_subtitles(); |
1182 } | |
1183 | |
1184 void guiExit(enum exit_reason how) | |
1185 { | |
1186 exit_player_with_rc(how, how >= EXIT_ERROR); | |
1187 } | 1187 } |
1188 | 1188 |
1189 // NOTE TO MYSELF: This function is nonsense. | 1189 // NOTE TO MYSELF: This function is nonsense. |
1190 // MPlayer should pass messages to the GUI | 1190 // MPlayer should pass messages to the GUI |
1191 // which must decide then which message has | 1191 // which must decide then which message has |