gtk: clean up some gcc warnings/kill some unused code
This commit is contained in:
parent
7d49d00616
commit
56e90340b1
|
@ -84,20 +84,20 @@ bool checkGTKVersion(int major_required, int minor_required)
|
|||
// This function configures a single hotkey
|
||||
int configHotkey(char* hotkeyString)
|
||||
{
|
||||
SDL_Surface *screen;
|
||||
//SDL_Surface *screen;
|
||||
SDL_Event event;
|
||||
KillVideo();
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
return 0; // TODO - SDL 2.0
|
||||
#else
|
||||
screen = SDL_SetVideoMode(420, 200, 8, 0);
|
||||
//screen = SDL_SetVideoMode(420, 200, 8, 0);
|
||||
//SDL_WM_SetCaption("Press a key to bind...", 0);
|
||||
|
||||
int newkey = 0;
|
||||
while(1)
|
||||
{
|
||||
SDL_WaitEvent(&event);
|
||||
|
||||
|
||||
switch (event.type)
|
||||
{
|
||||
case SDL_KEYDOWN:
|
||||
|
@ -520,8 +520,7 @@ void openHotkeyConfig()
|
|||
GtkTreeStore *hotkey_store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
std::string prefix = "SDL.Hotkeys.";
|
||||
GtkTreeIter iter; // parent
|
||||
GtkTreeIter iter2; // child
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_tree_store_append(hotkey_store, &iter, NULL); // aquire iter
|
||||
|
||||
|
@ -653,7 +652,7 @@ void openGamepadConfig()
|
|||
GtkWidget* vbox;
|
||||
GtkWidget* hboxPadNo;
|
||||
GtkWidget* padNoLabel;
|
||||
GtkWidget* configNoLabel;
|
||||
//GtkWidget* configNoLabel;
|
||||
GtkWidget* fourScoreChk;
|
||||
GtkWidget* oppositeDirChk;
|
||||
GtkWidget* buttonFrame;
|
||||
|
@ -674,7 +673,7 @@ void openGamepadConfig()
|
|||
|
||||
hboxPadNo = gtk_hbox_new(FALSE, 0);
|
||||
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");
|
||||
oppositeDirChk = gtk_check_button_new_with_label("Allow Up+Down / Left+Right");
|
||||
|
||||
|
@ -1210,7 +1209,6 @@ void openSoundConfig()
|
|||
GtkWidget* hbox2;
|
||||
GtkWidget* rateCombo;
|
||||
GtkWidget* rateLbl;
|
||||
GtkWidget* hbox3;
|
||||
GtkWidget* bufferLbl;
|
||||
GtkWidget* bufferHscale;
|
||||
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), rateCombo, FALSE, FALSE, 5);
|
||||
|
||||
hbox3 = gtk_hbox_new(FALSE, 2);
|
||||
bufferHscale = gtk_hscale_new_with_range(15, 200, 2);
|
||||
bufferLbl = gtk_label_new("Buffer size (in ms)");
|
||||
|
||||
|
@ -1318,7 +1315,6 @@ void openSoundConfig()
|
|||
swapDutyChk = gtk_check_button_new_with_label("Swap Duty Cycles");
|
||||
|
||||
// sync with cfg
|
||||
cfgBuf;
|
||||
g_config->getOption("SDL.SwapDuty", &cfgBuf);
|
||||
if(cfgBuf)
|
||||
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);
|
||||
}
|
||||
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.green = 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);
|
||||
|
||||
|
|
|
@ -38,39 +38,17 @@ void showGui(bool b);
|
|||
bool checkGTKVersion(int major_required, int minor_required);
|
||||
|
||||
int configHotkey(char* hotkeyString);
|
||||
int configGamepadButton(GtkButton* button, gpointer p);
|
||||
|
||||
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 launchNet(GtkWidget* w, gpointer p);
|
||||
void setUsername(GtkWidget* w, gpointer p);
|
||||
void netResponse(GtkWidget* w, gint response_id, gpointer p);
|
||||
void openNetworkConfig();
|
||||
void flushGtkEvents();
|
||||
|
||||
void openHotkeyConfig();
|
||||
int setInputDevice(GtkWidget* w, gpointer p);
|
||||
void updateGamepadConfig(GtkWidget* w, gpointer p);
|
||||
void openGamepadConfig();
|
||||
|
||||
int setBufSize(GtkWidget* w, gpointer p);
|
||||
void setRate(GtkWidget* w, gpointer p);
|
||||
void setQuality(GtkWidget* w, gpointer p);
|
||||
void resizeGtkWindow();
|
||||
void setScaler(GtkWidget* w, gpointer p);
|
||||
int setXscale(GtkWidget* w, gpointer p);
|
||||
int setYscale(GtkWidget* w, gpointer p);
|
||||
|
||||
#ifdef OPENGL
|
||||
void setGl(GtkWidget* w, gpointer p);
|
||||
|
@ -78,16 +56,13 @@ void setDoubleBuffering(GtkWidget* w, gpointer p);
|
|||
#endif
|
||||
|
||||
void openVideoConfig();
|
||||
int mixerChanged(GtkWidget* w, gpointer p);
|
||||
void openSoundConfig();
|
||||
void quit ();
|
||||
void openAbout ();
|
||||
void toggleSound(GtkWidget* check, gpointer data);
|
||||
|
||||
void emuReset ();
|
||||
void hardReset ();
|
||||
void enableFullscreen ();
|
||||
void toggleAutoResume (GtkToggleAction *action);
|
||||
|
||||
void recordMovie();
|
||||
void recordMovieAs ();
|
||||
|
@ -98,8 +73,6 @@ void loadLua ();
|
|||
void loadFdsBios ();
|
||||
|
||||
void enableGameGenie(int enabled);
|
||||
void toggleGameGenie(GtkToggleAction *action);
|
||||
void togglePause(GtkAction *action);
|
||||
void loadGameGenie ();
|
||||
|
||||
void loadNSF ();
|
||||
|
@ -109,11 +82,7 @@ void saveStateAs();
|
|||
void loadStateFrom();
|
||||
void quickLoad();
|
||||
void quickSave();
|
||||
void changeState(GtkAction *action, GtkRadioAction *current, gpointer data);
|
||||
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);
|
||||
|
||||
#endif // ifndef FCEUX_GUI_H
|
||||
|
|
Loading…
Reference in New Issue