Search
lxdream.org :: lxdream/src/gtkui/gtkui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/gtkui.c
changeset 1015:ad448bedc48a
prev889:5baaea6d9722
next1019:87f191f92f8f
author nkeynes
date Tue Jun 02 23:16:26 2009 +0000 (14 years ago)
permissions -rw-r--r--
last change "MythTV" patch from Wahrhaft, thanks!:
* Add support for LIRC input devices
* Add hotkey input support
* Add command-line option for immediate fullscreen
file annotate diff log raw
1.1 --- a/src/gtkui/gtkui.c Mon Oct 20 06:19:07 2008 +0000
1.2 +++ b/src/gtkui/gtkui.c Tue Jun 02 23:16:26 2009 +0000
1.3 @@ -85,6 +85,7 @@
1.4 { "ControllerSettings", NULL, N_("_Controllers..."), NULL, N_("Configure controllers"), G_CALLBACK(maple_settings_callback) },
1.5 { "NetworkSettings", NULL, N_("_Network..."), NULL, N_("Configure network settings"), G_CALLBACK(network_settings_callback) },
1.6 { "VideoSettings", NULL, N_("_Video..."), NULL,N_( "Configure video output"), G_CALLBACK(video_settings_callback) },
1.7 + { "HotkeySettings", NULL, N_("_Hotkeys..."), NULL,N_( "Configure hotkeys"), G_CALLBACK(hotkey_settings_callback) },
1.8 { "About", GTK_STOCK_ABOUT, N_("_About..."), NULL, N_("About lxdream"), G_CALLBACK(about_action_callback) },
1.9 { "DebugMenu", NULL, N_("_Debug") },
1.10 { "Debugger", NULL, N_("_Debugger"), NULL, N_("Open debugger window"), G_CALLBACK(debugger_action_callback) },
1.11 @@ -123,6 +124,7 @@
1.12 " <menuitem action='ControllerSettings'/>"
1.13 " <menuitem action='NetworkSettings'/>"
1.14 " <menuitem action='VideoSettings'/>"
1.15 + " <menuitem action='HotkeySettings'/>"
1.16 " <separator/>"
1.17 " <menuitem action='FullScreen'/>"
1.18 " </menu>"
1.19 @@ -167,6 +169,7 @@
1.20 " <menuitem action='ControllerSettings'/>"
1.21 " <menuitem action='NetworkSettings'/>"
1.22 " <menuitem action='VideoSettings'/>"
1.23 + " <menuitem action='HotkeySettings'/>"
1.24 " <separator/>"
1.25 " <menuitem action='FullScreen'/>"
1.26 " </menu>"
1.27 @@ -201,7 +204,7 @@
1.28 return TRUE;
1.29 }
1.30
1.31 -gboolean gui_init( gboolean withDebug )
1.32 +gboolean gui_init( gboolean withDebug, gboolean withFullscreen )
1.33 {
1.34 if( gtk_gui_init_ok ) {
1.35 GError *error = NULL;
1.36 @@ -236,6 +239,13 @@
1.37 if( withDebug ) {
1.38 gtk_gui_show_debugger();
1.39 }
1.40 +
1.41 + if (withFullscreen) {
1.42 + main_window_set_fullscreen(main_win, TRUE);
1.43 + //manually call full-screen state code for non-compliant window managers
1.44 + main_window_show_gui(main_win, TRUE);
1.45 + }
1.46 +
1.47 register_gdrom_disc_change_hook( gtk_gui_disc_changed, NULL );
1.48
1.49 return TRUE;
1.50 @@ -265,7 +275,7 @@
1.51 if( main_win != NULL ) {
1.52 main_window_set_use_grab(main_win, flag);
1.53 }
1.54 -}
1.55 +}
1.56
1.57 gboolean gui_error_dialog( const char *msg, ... )
1.58 {
1.59 @@ -291,6 +301,17 @@
1.60
1.61 }
1.62
1.63 +static gboolean gtk_run_later_callback( gpointer unused )
1.64 +{
1.65 + dreamcast_run();
1.66 + return FALSE;
1.67 +}
1.68 +
1.69 +void gui_run_later(void)
1.70 +{
1.71 + g_timeout_add_seconds(0, gtk_run_later_callback, NULL);
1.72 +}
1.73 +
1.74 void gtk_gui_show_debugger()
1.75 {
1.76 if( debug_win ) {
.