From 21d4d4abd158baffa54f3dbf3b517d1c125e0912 Mon Sep 17 00:00:00 2001 From: yabause Date: Mon, 8 Sep 2008 14:29:21 +0000 Subject: [PATCH] Commited patch by Orphis so gtk port build again. --- desmume/INSTALL | 5 ++++- desmume/src/gtk/Makefile.am | 16 ++++++++-------- desmume/src/gtk/{dToolsList.c => dToolsList.cpp} | 0 desmume/src/gtk/{desmume.c => desmume.cpp} | 0 desmume/src/gtk/{gdk_3Demu.c => gdk_3Demu.cpp} | 4 ++-- desmume/src/gtk/{gtk-compat.c => gtk-compat.cpp} | 0 desmume/src/gtk/{main.c => main.cpp} | 12 ++++++------ .../gtk/tools/{ioregsView.c => ioregsView.cpp} | 0 8 files changed, 20 insertions(+), 17 deletions(-) rename desmume/src/gtk/{dToolsList.c => dToolsList.cpp} (100%) rename desmume/src/gtk/{desmume.c => desmume.cpp} (100%) rename desmume/src/gtk/{gdk_3Demu.c => gdk_3Demu.cpp} (97%) rename desmume/src/gtk/{gtk-compat.c => gtk-compat.cpp} (100%) rename desmume/src/gtk/{main.c => main.cpp} (99%) rename desmume/src/gtk/tools/{ioregsView.c => ioregsView.cpp} (100%) diff --git a/desmume/INSTALL b/desmume/INSTALL index 5458714e1..d3c5b40a9 100644 --- a/desmume/INSTALL +++ b/desmume/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,6 +67,9 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== diff --git a/desmume/src/gtk/Makefile.am b/desmume/src/gtk/Makefile.am index 17aac8149..de7c2f521 100644 --- a/desmume/src/gtk/Makefile.am +++ b/desmume/src/gtk/Makefile.am @@ -11,14 +11,14 @@ EXTRA_DIST = DeSmuME.xpm dev-cpp/desmume.dev dev-cpp/desmume.layout \ dev-cpp/semaphore.h desmume.desktop bin_PROGRAMS = desmume desmume_SOURCES = \ - gtk-compat.c gtk-compat.h \ - desmume.h desmume.c \ - dTool.h dToolsList.c \ - tools/ioregsView.c tools/ioregsView.h \ + gtk-compat.cpp gtk-compat.h \ + desmume.h desmume.cpp \ + dTool.h dToolsList.cpp \ + tools/ioregsView.cpp tools/ioregsView.h \ globals.h \ - ../sndsdl.c \ - ../ctrlssdl.h ../ctrlssdl.c \ - gdk_3Demu.c gdk_3Demu.h \ - main.c + ../sndsdl.cpp \ + ../ctrlssdl.h ../ctrlssdl.cpp \ + gdk_3Demu.cpp gdk_3Demu.h \ + main.cpp desmume_LDADD = ../libdesmume.a ../gdbstub/libgdbstub.a \ $(SDL_LIBS) $(GTK_LIBS) $(GTKGLEXT_LIBS) $(GTHREAD_LIBS) diff --git a/desmume/src/gtk/dToolsList.c b/desmume/src/gtk/dToolsList.cpp similarity index 100% rename from desmume/src/gtk/dToolsList.c rename to desmume/src/gtk/dToolsList.cpp diff --git a/desmume/src/gtk/desmume.c b/desmume/src/gtk/desmume.cpp similarity index 100% rename from desmume/src/gtk/desmume.c rename to desmume/src/gtk/desmume.cpp diff --git a/desmume/src/gtk/gdk_3Demu.c b/desmume/src/gtk/gdk_3Demu.cpp similarity index 97% rename from desmume/src/gtk/gdk_3Demu.c rename to desmume/src/gtk/gdk_3Demu.cpp index 76c4cecf9..0e66e5d4c 100644 --- a/desmume/src/gtk/gdk_3Demu.c +++ b/desmume/src/gtk/gdk_3Demu.cpp @@ -155,10 +155,10 @@ init_opengl_gdk_3Demu( void) { return 0; } - glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGBA | + glconfig = gdk_gl_config_new_by_mode ((GdkGLConfigMode)(GDK_GL_MODE_RGBA | GDK_GL_MODE_DEPTH | GDK_GL_MODE_STENCIL | - GDK_GL_MODE_SINGLE); + GDK_GL_MODE_SINGLE)); if (glconfig == NULL) { g_print ("*** No appropriate OpenGL-capable visual found.\n"); diff --git a/desmume/src/gtk/gtk-compat.c b/desmume/src/gtk/gtk-compat.cpp similarity index 100% rename from desmume/src/gtk/gtk-compat.c rename to desmume/src/gtk/gtk-compat.cpp diff --git a/desmume/src/gtk/main.c b/desmume/src/gtk/main.cpp similarity index 99% rename from desmume/src/gtk/main.c rename to desmume/src/gtk/main.cpp index 836b28649..9ad868cac 100644 --- a/desmume/src/gtk/main.c +++ b/desmume/src/gtk/main.cpp @@ -286,7 +286,7 @@ createThread_gdb( void (*thread_function)( void *data), void joinThread_gdb( void *thread_handle) { - g_thread_join( thread_handle); + g_thread_join( (GThread *)thread_handle); } @@ -1552,7 +1552,7 @@ static Uint32 fps_limiter_fn(Uint32 interval, void *param) { } static void dui_set_accel_group(gpointer action, gpointer group) { - gtk_action_set_accel_group(action, group); + gtk_action_set_accel_group((GtkAction *)action, (GtkAccelGroup *)group); } /////////////////////////////// MAIN /////////////////////////////// @@ -1621,17 +1621,17 @@ common_gtk_main( struct configured_features *my_config) { #ifdef GTKGLEXT_AVAILABLE /* Try double-buffered visual */ - glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB | + glconfig = gdk_gl_config_new_by_mode ((GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DEPTH | - GDK_GL_MODE_DOUBLE); + GDK_GL_MODE_DOUBLE)); if (glconfig == NULL) { g_print ("*** Cannot find the double-buffered visual.\n"); g_print ("*** Trying single-buffered visual.\n"); /* Try single-buffered visual */ - glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB | - GDK_GL_MODE_DEPTH); + glconfig = gdk_gl_config_new_by_mode ((GdkGLConfigMode)(GDK_GL_MODE_RGB | + GDK_GL_MODE_DEPTH)); if (glconfig == NULL) { g_print ("*** No appropriate OpenGL-capable visual found.\n"); exit (1); diff --git a/desmume/src/gtk/tools/ioregsView.c b/desmume/src/gtk/tools/ioregsView.cpp similarity index 100% rename from desmume/src/gtk/tools/ioregsView.c rename to desmume/src/gtk/tools/ioregsView.cpp