gtk: clean up some gcc warnings/kill some unused code
This commit is contained in:
parent
7d49d00616
commit
56e90340b1
|
@ -84,13 +84,13 @@ bool checkGTKVersion(int major_required, int minor_required)
|
||||||
// This function configures a single hotkey
|
// This function configures a single hotkey
|
||||||
int configHotkey(char* hotkeyString)
|
int configHotkey(char* hotkeyString)
|
||||||
{
|
{
|
||||||
SDL_Surface *screen;
|
//SDL_Surface *screen;
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
KillVideo();
|
KillVideo();
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||||
return 0; // TODO - SDL 2.0
|
return 0; // TODO - SDL 2.0
|
||||||
#else
|
#else
|
||||||
screen = SDL_SetVideoMode(420, 200, 8, 0);
|
//screen = SDL_SetVideoMode(420, 200, 8, 0);
|
||||||
//SDL_WM_SetCaption("Press a key to bind...", 0);
|
//SDL_WM_SetCaption("Press a key to bind...", 0);
|
||||||
|
|
||||||
int newkey = 0;
|
int newkey = 0;
|
||||||
|
@ -520,8 +520,7 @@ void openHotkeyConfig()
|
||||||
GtkTreeStore *hotkey_store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
GtkTreeStore *hotkey_store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
||||||
|
|
||||||
std::string prefix = "SDL.Hotkeys.";
|
std::string prefix = "SDL.Hotkeys.";
|
||||||
GtkTreeIter iter; // parent
|
GtkTreeIter iter;
|
||||||
GtkTreeIter iter2; // child
|
|
||||||
|
|
||||||
gtk_tree_store_append(hotkey_store, &iter, NULL); // aquire iter
|
gtk_tree_store_append(hotkey_store, &iter, NULL); // aquire iter
|
||||||
|
|
||||||
|
@ -653,7 +652,7 @@ void openGamepadConfig()
|
||||||
GtkWidget* vbox;
|
GtkWidget* vbox;
|
||||||
GtkWidget* hboxPadNo;
|
GtkWidget* hboxPadNo;
|
||||||
GtkWidget* padNoLabel;
|
GtkWidget* padNoLabel;
|
||||||
GtkWidget* configNoLabel;
|
//GtkWidget* configNoLabel;
|
||||||
GtkWidget* fourScoreChk;
|
GtkWidget* fourScoreChk;
|
||||||
GtkWidget* oppositeDirChk;
|
GtkWidget* oppositeDirChk;
|
||||||
GtkWidget* buttonFrame;
|
GtkWidget* buttonFrame;
|
||||||
|
@ -674,7 +673,7 @@ void openGamepadConfig()
|
||||||
|
|
||||||
hboxPadNo = gtk_hbox_new(FALSE, 0);
|
hboxPadNo = gtk_hbox_new(FALSE, 0);
|
||||||
padNoLabel = gtk_label_new("Port:");
|
padNoLabel = gtk_label_new("Port:");
|
||||||
configNoLabel = gtk_label_new("Config Number:");
|
//configNoLabel = gtk_label_new("Config Number:");
|
||||||
fourScoreChk = gtk_check_button_new_with_label("Enable Four Score");
|
fourScoreChk = gtk_check_button_new_with_label("Enable Four Score");
|
||||||
oppositeDirChk = gtk_check_button_new_with_label("Allow Up+Down / Left+Right");
|
oppositeDirChk = gtk_check_button_new_with_label("Allow Up+Down / Left+Right");
|
||||||
|
|
||||||
|
@ -1210,7 +1209,6 @@ void openSoundConfig()
|
||||||
GtkWidget* hbox2;
|
GtkWidget* hbox2;
|
||||||
GtkWidget* rateCombo;
|
GtkWidget* rateCombo;
|
||||||
GtkWidget* rateLbl;
|
GtkWidget* rateLbl;
|
||||||
GtkWidget* hbox3;
|
|
||||||
GtkWidget* bufferLbl;
|
GtkWidget* bufferLbl;
|
||||||
GtkWidget* bufferHscale;
|
GtkWidget* bufferHscale;
|
||||||
GtkWidget* swapDutyChk;
|
GtkWidget* swapDutyChk;
|
||||||
|
@ -1304,7 +1302,6 @@ void openSoundConfig()
|
||||||
gtk_box_pack_start(GTK_BOX(hbox2), rateLbl, FALSE, FALSE, 5);
|
gtk_box_pack_start(GTK_BOX(hbox2), rateLbl, FALSE, FALSE, 5);
|
||||||
gtk_box_pack_start(GTK_BOX(hbox2), rateCombo, FALSE, FALSE, 5);
|
gtk_box_pack_start(GTK_BOX(hbox2), rateCombo, FALSE, FALSE, 5);
|
||||||
|
|
||||||
hbox3 = gtk_hbox_new(FALSE, 2);
|
|
||||||
bufferHscale = gtk_hscale_new_with_range(15, 200, 2);
|
bufferHscale = gtk_hscale_new_with_range(15, 200, 2);
|
||||||
bufferLbl = gtk_label_new("Buffer size (in ms)");
|
bufferLbl = gtk_label_new("Buffer size (in ms)");
|
||||||
|
|
||||||
|
@ -1318,7 +1315,6 @@ void openSoundConfig()
|
||||||
swapDutyChk = gtk_check_button_new_with_label("Swap Duty Cycles");
|
swapDutyChk = gtk_check_button_new_with_label("Swap Duty Cycles");
|
||||||
|
|
||||||
// sync with cfg
|
// sync with cfg
|
||||||
cfgBuf;
|
|
||||||
g_config->getOption("SDL.SwapDuty", &cfgBuf);
|
g_config->getOption("SDL.SwapDuty", &cfgBuf);
|
||||||
if(cfgBuf)
|
if(cfgBuf)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(swapDutyChk), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(swapDutyChk), TRUE);
|
||||||
|
@ -2564,11 +2560,13 @@ void handle_resize(GtkWindow* win, GdkEvent* event, gpointer data)
|
||||||
InitVideo(GameInfo);
|
InitVideo(GameInfo);
|
||||||
}
|
}
|
||||||
gtk_widget_set_size_request(evbox, (int)(NES_WIDTH*xscale), (int)(NES_HEIGHT*yscale));
|
gtk_widget_set_size_request(evbox, (int)(NES_WIDTH*xscale), (int)(NES_HEIGHT*yscale));
|
||||||
GdkColor black;
|
|
||||||
|
// Currently unused; unsure why
|
||||||
|
/* GdkColor black;
|
||||||
black.red = 0;
|
black.red = 0;
|
||||||
black.green = 0;
|
black.green = 0;
|
||||||
black.blue = 0;
|
black.blue = 0;
|
||||||
// gtk_widget_modify_bg(GTK_WIDGET(win), GTK_STATE_NORMAL, &black);
|
gtk_widget_modify_bg(GTK_WIDGET(win), GTK_STATE_NORMAL, &black);*/
|
||||||
|
|
||||||
printf("DEBUG: new xscale: %f yscale: %f\n", xscale, yscale);
|
printf("DEBUG: new xscale: %f yscale: %f\n", xscale, yscale);
|
||||||
|
|
||||||
|
|
|
@ -38,39 +38,17 @@ void showGui(bool b);
|
||||||
bool checkGTKVersion(int major_required, int minor_required);
|
bool checkGTKVersion(int major_required, int minor_required);
|
||||||
|
|
||||||
int configHotkey(char* hotkeyString);
|
int configHotkey(char* hotkeyString);
|
||||||
int configGamepadButton(GtkButton* button, gpointer p);
|
|
||||||
|
|
||||||
void resetVideo();
|
void resetVideo();
|
||||||
void closeVideoWin(GtkWidget* w, gint response, gpointer p);
|
|
||||||
void closeDialog(GtkWidget* w, GdkEvent* e, gpointer p);
|
|
||||||
|
|
||||||
void toggleLowPass(GtkWidget* w, gpointer p);
|
|
||||||
void toggleOption(GtkWidget* w, gpointer p);
|
|
||||||
|
|
||||||
int setTint(GtkWidget* w, gpointer p);
|
|
||||||
int setHue(GtkWidget* w, gpointer p);
|
|
||||||
void loadPalette (GtkWidget* w, gpointer p);
|
|
||||||
void clearPalette(GtkWidget* w, gpointer p);
|
|
||||||
void openPaletteConfig();
|
void openPaletteConfig();
|
||||||
|
|
||||||
void launchNet(GtkWidget* w, gpointer p);
|
|
||||||
void setUsername(GtkWidget* w, gpointer p);
|
|
||||||
void netResponse(GtkWidget* w, gint response_id, gpointer p);
|
|
||||||
void openNetworkConfig();
|
void openNetworkConfig();
|
||||||
void flushGtkEvents();
|
void flushGtkEvents();
|
||||||
|
|
||||||
void openHotkeyConfig();
|
void openHotkeyConfig();
|
||||||
int setInputDevice(GtkWidget* w, gpointer p);
|
|
||||||
void updateGamepadConfig(GtkWidget* w, gpointer p);
|
|
||||||
void openGamepadConfig();
|
void openGamepadConfig();
|
||||||
|
|
||||||
int setBufSize(GtkWidget* w, gpointer p);
|
|
||||||
void setRate(GtkWidget* w, gpointer p);
|
|
||||||
void setQuality(GtkWidget* w, gpointer p);
|
|
||||||
void resizeGtkWindow();
|
void resizeGtkWindow();
|
||||||
void setScaler(GtkWidget* w, gpointer p);
|
|
||||||
int setXscale(GtkWidget* w, gpointer p);
|
|
||||||
int setYscale(GtkWidget* w, gpointer p);
|
|
||||||
|
|
||||||
#ifdef OPENGL
|
#ifdef OPENGL
|
||||||
void setGl(GtkWidget* w, gpointer p);
|
void setGl(GtkWidget* w, gpointer p);
|
||||||
|
@ -78,16 +56,13 @@ void setDoubleBuffering(GtkWidget* w, gpointer p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void openVideoConfig();
|
void openVideoConfig();
|
||||||
int mixerChanged(GtkWidget* w, gpointer p);
|
|
||||||
void openSoundConfig();
|
void openSoundConfig();
|
||||||
void quit ();
|
void quit ();
|
||||||
void openAbout ();
|
void openAbout ();
|
||||||
void toggleSound(GtkWidget* check, gpointer data);
|
|
||||||
|
|
||||||
void emuReset ();
|
void emuReset ();
|
||||||
void hardReset ();
|
void hardReset ();
|
||||||
void enableFullscreen ();
|
void enableFullscreen ();
|
||||||
void toggleAutoResume (GtkToggleAction *action);
|
|
||||||
|
|
||||||
void recordMovie();
|
void recordMovie();
|
||||||
void recordMovieAs ();
|
void recordMovieAs ();
|
||||||
|
@ -98,8 +73,6 @@ void loadLua ();
|
||||||
void loadFdsBios ();
|
void loadFdsBios ();
|
||||||
|
|
||||||
void enableGameGenie(int enabled);
|
void enableGameGenie(int enabled);
|
||||||
void toggleGameGenie(GtkToggleAction *action);
|
|
||||||
void togglePause(GtkAction *action);
|
|
||||||
void loadGameGenie ();
|
void loadGameGenie ();
|
||||||
|
|
||||||
void loadNSF ();
|
void loadNSF ();
|
||||||
|
@ -109,11 +82,7 @@ void saveStateAs();
|
||||||
void loadStateFrom();
|
void loadStateFrom();
|
||||||
void quickLoad();
|
void quickLoad();
|
||||||
void quickSave();
|
void quickSave();
|
||||||
void changeState(GtkAction *action, GtkRadioAction *current, gpointer data);
|
|
||||||
unsigned short GDKToSDLKeyval(int gdk_key);
|
unsigned short GDKToSDLKeyval(int gdk_key);
|
||||||
gint convertKeypress(GtkWidget *grab, GdkEventKey *event, gpointer user_data);
|
|
||||||
gint handleMouseClick(GtkWidget* widget, GdkEvent *event, gpointer callback_data);
|
|
||||||
void handle_resize(GtkWindow* win, GdkEvent* event, gpointer data);
|
|
||||||
int InitGTKSubsystem(int argc, char** argv);
|
int InitGTKSubsystem(int argc, char** argv);
|
||||||
|
|
||||||
#endif // ifndef FCEUX_GUI_H
|
#endif // ifndef FCEUX_GUI_H
|
||||||
|
|
Loading…
Reference in New Issue