sdl: removed GTK_LITE build option in favor of --nogui runtime option
you can still disbale compiling in gtk with GTK=0
This commit is contained in:
parent
a7c16f1835
commit
4f1bae8c58
|
@ -13,7 +13,6 @@ opts.AddVariables(
|
||||||
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1),
|
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1),
|
||||||
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
|
||||||
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
|
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
|
||||||
BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
env = Environment(options = opts)
|
env = Environment(options = opts)
|
||||||
|
@ -57,15 +56,12 @@ else:
|
||||||
if not conf.CheckLib('SDL'):
|
if not conf.CheckLib('SDL'):
|
||||||
print 'Did not find libSDL or SDL.lib, exiting!'
|
print 'Did not find libSDL or SDL.lib, exiting!'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
if env['GTK'] or env['GTK_LITE']:
|
if env['GTK']:
|
||||||
# Add compiler and linker flags from pkg-config
|
# Add compiler and linker flags from pkg-config
|
||||||
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
||||||
env.Append(CPPDEFINES=["_GTK2"])
|
env.Append(CPPDEFINES=["_GTK2"])
|
||||||
if env['GTK']:
|
if env['GTK']:
|
||||||
env.Append(CCFLAGS = ["-D_GTK"])
|
env.Append(CCFLAGS = ["-D_GTK"])
|
||||||
env.Append(CCFLAGS =["-D_GTK_LITE"])
|
|
||||||
if env['GTK_LITE']:
|
|
||||||
env.Append(CCFLAGS =["-D_GTK_LITE"])
|
|
||||||
|
|
||||||
### Lua platform defines
|
### Lua platform defines
|
||||||
### Applies to all files even though only lua needs it, but should be ok
|
### Applies to all files even though only lua needs it, but should be ok
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
18-mar-2011 - prg318 - sdl - removed GTK_LITE; --nogui made it obsolete
|
||||||
12-feb-2010 - mart0258 - Fix input selection for Famicom Expansion port
|
12-feb-2010 - mart0258 - Fix input selection for Famicom Expansion port
|
||||||
25-jan-2010 - prg318 - gtk - filechooser now remembers last file opened
|
25-jan-2010 - prg318 - gtk - filechooser now remembers last file opened
|
||||||
25-jan-2010 - prg318 - gtk - fixed xscale/yscale spinbuttons not changing config
|
25-jan-2010 - prg318 - gtk - fixed xscale/yscale spinbuttons not changing config
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#ifndef FCEUX_GUI_H
|
#ifndef FCEUX_GUI_H
|
||||||
#define FCEUX_GUI_H
|
#define FCEUX_GUI_H
|
||||||
#define GTK_LITE
|
#define GTK
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
extern GtkWidget* MainWindow;
|
extern GtkWidget* MainWindow;
|
||||||
extern GtkWidget* socket;
|
extern GtkWidget* socket;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include "../../fceulua.h"
|
#include "../../fceulua.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GTK_LITE
|
#ifdef _GTK
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#ifdef SDL_VIDEO_DRIVER_X11
|
#ifdef SDL_VIDEO_DRIVER_X11
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
@ -217,7 +217,7 @@ std::string GetFilename(const char* title, bool save, const char* filter)
|
||||||
fname = GetOpenFileName(&ofn);
|
fname = GetOpenFileName(&ofn);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef _GTK_LITE
|
#ifdef _GTK
|
||||||
int fullscreen = 0;
|
int fullscreen = 0;
|
||||||
g_config->getOption("SDL.Fullscreen", &fullscreen);
|
g_config->getOption("SDL.Fullscreen", &fullscreen);
|
||||||
if(fullscreen)
|
if(fullscreen)
|
||||||
|
@ -272,7 +272,7 @@ std::string GetFilename(const char* title, bool save, const char* filter)
|
||||||
*/
|
*/
|
||||||
std::string GetUserText(const char* title)
|
std::string GetUserText(const char* title)
|
||||||
{
|
{
|
||||||
#ifdef _GTK_LITE
|
#ifdef _GTK
|
||||||
|
|
||||||
GtkWidget* d;
|
GtkWidget* d;
|
||||||
GtkWidget* entry;
|
GtkWidget* entry;
|
||||||
|
|
|
@ -13,10 +13,8 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef _GTK_LITE
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#endif
|
|
||||||
#ifdef _GTK
|
#ifdef _GTK
|
||||||
|
#include <gtk/gtk.h>
|
||||||
#include "gui.cpp"
|
#include "gui.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -158,7 +156,7 @@ static void ShowUsage(char *prog)
|
||||||
printf("Compiled with SDL version %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL );
|
printf("Compiled with SDL version %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL );
|
||||||
const SDL_version* v = SDL_Linked_Version();
|
const SDL_version* v = SDL_Linked_Version();
|
||||||
printf("Linked with SDL version %d.%d.%d\n", v->major, v->minor, v->patch);
|
printf("Linked with SDL version %d.%d.%d\n", v->major, v->minor, v->patch);
|
||||||
#ifdef GTK_LITE
|
#ifdef GTK
|
||||||
printf("Compiled with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
|
printf("Compiled with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
|
||||||
//printf("Linked with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
|
//printf("Linked with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
|
||||||
#endif
|
#endif
|
||||||
|
@ -726,13 +724,9 @@ int main(int argc, char *argv[])
|
||||||
// load the hotkeys from the config life
|
// load the hotkeys from the config life
|
||||||
setHotKeys();
|
setHotKeys();
|
||||||
|
|
||||||
// GTK_LITE: gtk is linked for dialogs
|
|
||||||
// gtk needs to be started somewhere
|
|
||||||
// GTK: full gtk GUI. we're starting it here.
|
|
||||||
#ifdef _GTK_LITE
|
|
||||||
gtk_init(&argc, &argv);
|
|
||||||
#endif
|
|
||||||
#ifdef _GTK
|
#ifdef _GTK
|
||||||
|
gtk_init(&argc, &argv);
|
||||||
|
|
||||||
int noGui;
|
int noGui;
|
||||||
g_config->getOption("SDL.NoGUI", &noGui);
|
g_config->getOption("SDL.NoGUI", &noGui);
|
||||||
if(noGui == 0)
|
if(noGui == 0)
|
||||||
|
|
Loading…
Reference in New Issue