annotate libvo/sdl_common.h @ 33307:552f1f7731c8

Set GUI initialization flag earlier. So far, the flag is set after the call of guiInit(), but there are calls to GUI functions (like reading the GUI config) before that. As MPlayer (when exiting) only calls GUI's cleanup function guiDone() if the flag is set, it neglects calling guiDone() on any error between the first GUI function call and execution of guiInit(). Now the flag is set before the first GUI function call. As a result, GUI's own exit function (also used for fatal GUI errors, and thus also for errors occurring before guiInit() properly finishes) doesn't have to handle cleanup any longer. The code can be moved to guiDone().
author ib
date Sat, 07 May 2011 15:30:14 +0000
parents b2329beb7406
children f1a31e5fc35f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31032
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
1 /*
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
2 * common SDL routines
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
3 *
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
4 * This file is part of MPlayer.
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
5 *
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
6 * MPlayer is free software; you can redistribute it and/or modify
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
9 * (at your option) any later version.
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
10 *
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
11 * MPlayer is distributed in the hope that it will be useful,
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
14 * GNU General Public License for more details.
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
15 *
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License along
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
19 */
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
20
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
21 #ifndef MPLAYER_SDL_COMMON_H
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
22 #define MPLAYER_SDL_COMMON_H
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
23
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
24 #include "config.h"
31892
b2329beb7406 Add #includes for headers necessary to pass 'make checkheaders'.
diego
parents: 31045
diff changeset
25 #include <stdint.h>
31032
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
26 #ifdef CONFIG_SDL_SDL_H
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
27 #include <SDL/SDL.h>
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
28 #else
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
29 #include <SDL.h>
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
30 #endif
31033
8d1080e9c92d Window resizing support for -vo gl with SDL backend.
reimar
parents: 31032
diff changeset
31
31037
4f273572e445 Share SDL initialization code.
reimar
parents: 31035
diff changeset
32 int vo_sdl_init(void);
4f273572e445 Share SDL initialization code.
reimar
parents: 31035
diff changeset
33 void vo_sdl_uninit(void);
31035
5aae99fd6ca7 Fullscreen support for -vo gl using SDL.
reimar
parents: 31033
diff changeset
34 void vo_sdl_fullscreen(void);
31033
8d1080e9c92d Window resizing support for -vo gl with SDL backend.
reimar
parents: 31032
diff changeset
35 int sdl_set_mode(int bpp, uint32_t flags);
31032
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
36 int sdl_default_handle_event(SDL_Event *event);
362425fe3de8 Add sdl_common file and use it to share the input handling between -vo gl
reimar
parents:
diff changeset
37
31045
56dea60de72c Add comment for endif.
reimar
parents: 31037
diff changeset
38 #endif /* MPLAYER_SDL_COMMON_H */