From 17057e9fceb60cac20619a8e7ef529ac66156459 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Wed, 3 Mar 2010 03:28:42 +0000 Subject: [PATCH] SDL: added stubs to compile with adelikats latest changes GTK: added code for a gtk terminal window (broken) (not currently being used) --- src/drivers/sdl/gui.cpp | 23 +++++++++++++++++++++++ src/drivers/sdl/sdl-video.cpp | 4 ++++ src/drivers/sdl/sdl-video.h | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index 505be2f6..f444e53d 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -36,6 +36,28 @@ extern Config *g_config; GtkWidget* MainWindow = NULL; GtkWidget* padNoCombo; +GtkTextBuffer* tb = gtk_text_buffer_new(NULL); + +void openGTKterm() +{ + GtkWidget* win = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget* vbox = gtk_vbox_new(FALSE, 5); + + GtkWidget* textV = gtk_text_view_new_with_buffer(tb); + gtk_text_view_set_editable(GTK_TEXT_VIEW(textV), FALSE); + GtkWidget* entry = gtk_entry_new(); + gtk_text_buffer_set_text(tb, "HELLO FCEUX!", -1); + + gtk_box_pack_start(GTK_BOX(vbox), textV, TRUE, TRUE, 5); + gtk_box_pack_start(GTK_BOX(vbox), entry, TRUE, TRUE, 5); + + gtk_container_add(GTK_CONTAINER(win), vbox); + + gtk_widget_show_all(win); + + return; +} + // This function configures a single button on a gamepad int configGamepadButton(GtkButton* button, gpointer p) { @@ -1284,6 +1306,7 @@ static GtkItemFactoryEntry menu_items[] = { { "/Emulator/_FDS/_Switch Disk", NULL, FCEU_FDSSelect, 0, ""}, { "/Emulator/_FDS/_Eject Disk", NULL, FCEU_FDSInsert, 0, ""}, { "/Emulator/_FDS/Load _BIOS File", NULL, loadFdsBios, 0, ""}, + //{ "/Emulator/GTKterm (DEV)", NULL, openGTKterm, 0, ""}, { "/_Movie", NULL, NULL, 0, "" }, { "/Movie/_Open", NULL, loadMovie, 0, ""}, { "/Movie/S_top", NULL, FCEUI_StopMovie, 0, ""}, diff --git a/src/drivers/sdl/sdl-video.cpp b/src/drivers/sdl/sdl-video.cpp index 2590586e..5433f246 100644 --- a/src/drivers/sdl/sdl-video.cpp +++ b/src/drivers/sdl/sdl-video.cpp @@ -75,6 +75,10 @@ static int s_paletterefresh; extern bool MaxSpeed; +bool FCEUI_AviDisableMovieMessages() +{ + return false; +} /** * Attempts to destroy the graphical video display. Returns 0 on * success, -1 on failure. diff --git a/src/drivers/sdl/sdl-video.h b/src/drivers/sdl/sdl-video.h index 91b41e68..75e5e4a4 100644 --- a/src/drivers/sdl/sdl-video.h +++ b/src/drivers/sdl/sdl-video.h @@ -2,7 +2,7 @@ #define __FCEU_SDL_VIDEO_H uint32 PtoV(uint16 x, uint16 y); bool FCEUD_ShouldDrawInputAids(); - +bool FCEUI_AviDisableMovieMessages(); static SDL_Surface *s_screen; #endif