GTK+/style: Remove explicit returns in void funcs.

This commit is contained in:
Brandon Wright 2018-11-02 16:12:57 -05:00
parent a04ccfc02c
commit c5038bc9fe
19 changed files with 0 additions and 468 deletions

View File

@ -301,8 +301,6 @@ void EPX_16_unsafe (uint8 *srcPtr,
srcPtr += srcPitch; srcPtr += srcPitch;
dstPtr += dstPitch << 1; dstPtr += dstPitch << 1;
} }
return;
} }
/* Blends with edge pixel instead of just using it directly. */ /* Blends with edge pixel instead of just using it directly. */
@ -399,6 +397,4 @@ void EPX_16_smooth_unsafe (uint8 *srcPtr,
srcPtr += srcPitch; srcPtr += srcPitch;
dstPtr += dstPitch << 1; dstPtr += dstPitch << 1;
} }
return;
} }

View File

@ -14,8 +14,6 @@
Binding::Binding () Binding::Binding ()
{ {
value = 0; value = 0;
return;
} }
Binding::Binding (GdkEventKey *event) Binding::Binding (GdkEventKey *event)
@ -42,8 +40,6 @@ Binding::Binding (GdkEventKey *event)
if (event->state & GDK_MOD1_MASK) if (event->state & GDK_MOD1_MASK)
value |= BINDING_ALT; value |= BINDING_ALT;
return;
} }
Binding::Binding (unsigned int key, bool ctrl, bool shift, bool alt) Binding::Binding (unsigned int key, bool ctrl, bool shift, bool alt)
@ -73,8 +69,6 @@ Binding::Binding (unsigned int device,
Binding::Binding (unsigned int val) Binding::Binding (unsigned int val)
{ {
value = val; value = val;
return;
} }
Binding::Binding (const Binding& binding) Binding::Binding (const Binding& binding)
@ -97,8 +91,6 @@ void
Binding::clear () Binding::clear ()
{ {
value = 0; value = 0;
return;
} }
unsigned int unsigned int
@ -282,6 +274,4 @@ Binding::to_string (char *str)
{ {
sprintf (str, _("Unset")); sprintf (str, _("Unset"));
} }
return;
} }

View File

@ -14,8 +14,6 @@ GtkBuilderWindow::GtkBuilderWindow (const char *root)
NULL); NULL);
window = get_widget (root); window = get_widget (root);
return;
} }
GtkBuilderWindow::~GtkBuilderWindow () GtkBuilderWindow::~GtkBuilderWindow ()
@ -76,8 +74,6 @@ GtkBuilderWindow::signal_connection_func (GtkBuilder *builder,
else else
{ {
} }
return;
} }
void void
@ -93,16 +89,12 @@ GtkBuilderWindow::signal_connect (GtkBuilderWindowCallbacks *callbacks)
(gpointer) this); (gpointer) this);
this->callbacks = NULL; this->callbacks = NULL;
return;
} }
void void
GtkBuilderWindow::enable_widget (const char *name, unsigned char state) GtkBuilderWindow::enable_widget (const char *name, unsigned char state)
{ {
gtk_widget_set_sensitive (get_widget (name), state); gtk_widget_set_sensitive (get_widget (name), state);
return;
} }
void void
@ -110,16 +102,12 @@ GtkBuilderWindow::resize (int width, int height)
{ {
if (width > 0 && height > 0) if (width > 0 && height > 0)
gtk_window_resize (GTK_WINDOW (window), width, height); gtk_window_resize (GTK_WINDOW (window), width, height);
return;
} }
void void
GtkBuilderWindow::refresh () GtkBuilderWindow::refresh ()
{ {
gtk_widget_queue_draw (GTK_WIDGET (window)); gtk_widget_queue_draw (GTK_WIDGET (window));
return;
} }
int int
@ -146,8 +134,6 @@ void
GtkBuilderWindow::set_button_label (const char *name, const char *label) GtkBuilderWindow::set_button_label (const char *name, const char *label)
{ {
gtk_button_set_label (GTK_BUTTON (get_widget (name)), label); gtk_button_set_label (GTK_BUTTON (get_widget (name)), label);
return;
} }
unsigned char unsigned char
@ -186,8 +172,6 @@ void
GtkBuilderWindow::set_slider (const char *name, float value) GtkBuilderWindow::set_slider (const char *name, float value)
{ {
gtk_range_set_value (GTK_RANGE (get_widget (name)), (double) value); gtk_range_set_value (GTK_RANGE (get_widget (name)), (double) value);
return;
} }
void void
@ -195,7 +179,6 @@ GtkBuilderWindow::set_check (const char *name, unsigned char value)
{ {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (get_widget (name)), gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (get_widget (name)),
value); value);
return;
} }
void void
@ -205,24 +188,18 @@ GtkBuilderWindow::set_entry_value (const char *name, unsigned int value)
snprintf (text, 80, "%u", value); snprintf (text, 80, "%u", value);
gtk_entry_set_text (GTK_ENTRY (get_widget (name)), text); gtk_entry_set_text (GTK_ENTRY (get_widget (name)), text);
return;
} }
void void
GtkBuilderWindow::set_entry_text (const char *name, const char *text) GtkBuilderWindow::set_entry_text (const char *name, const char *text)
{ {
gtk_entry_set_text (GTK_ENTRY (get_widget (name)), text); gtk_entry_set_text (GTK_ENTRY (get_widget (name)), text);
return;
} }
void void
GtkBuilderWindow::set_combo (const char *name, unsigned char value) GtkBuilderWindow::set_combo (const char *name, unsigned char value)
{ {
gtk_combo_box_set_active (GTK_COMBO_BOX (get_widget (name)), value); gtk_combo_box_set_active (GTK_COMBO_BOX (get_widget (name)), value);
return;
} }
void void
@ -230,8 +207,6 @@ GtkBuilderWindow::set_spin (const char *name, double value)
{ {
gtk_spin_button_set_value (GTK_SPIN_BUTTON (get_widget (name)), gtk_spin_button_set_value (GTK_SPIN_BUTTON (get_widget (name)),
(double) value); (double) value);
return;
} }
void void
@ -250,8 +225,6 @@ GtkBuilderWindow::combo_box_append (GtkComboBox *combo, const char *value)
gtk_list_store_append (store, &iter); gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, value, -1); gtk_list_store_set (store, &iter, 0, value, -1);
return;
} }
GtkWindow * GtkWindow *

View File

@ -25,8 +25,6 @@ display_errorbox (const char *error)
gtk_window_set_title (GTK_WINDOW (dialog), _("Error")); gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
gtk_dialog_run (GTK_DIALOG (dialog)); gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return;
} }
static void static void
@ -73,8 +71,6 @@ event_code_toggled (GtkCellRendererToggle *cell_renderer,
int enabled = !gtk_cell_renderer_toggle_get_active (cell_renderer); int enabled = !gtk_cell_renderer_toggle_get_active (cell_renderer);
((Snes9xCheats *) data)->toggle_code (path, enabled); ((Snes9xCheats *) data)->toggle_code (path, enabled);
return;
} }
static void static void
@ -84,8 +80,6 @@ event_row_activated (GtkTreeView *tree_view,
gpointer data) gpointer data)
{ {
((Snes9xCheats *) data)->row_activated (path); ((Snes9xCheats *) data)->row_activated (path);
return;
} }
static void static void
@ -96,8 +90,6 @@ event_row_inserted (GtkTreeModel *tree_model,
{ {
int *indices = gtk_tree_path_get_indices (path); int *indices = gtk_tree_path_get_indices (path);
((Snes9xCheats *) data)->row_inserted (indices[0]); ((Snes9xCheats *) data)->row_inserted (indices[0]);
return;
} }
static void static void
@ -107,8 +99,6 @@ event_row_deleted (GtkTreeModel *tree_model,
{ {
int *indices = gtk_tree_path_get_indices (path); int *indices = gtk_tree_path_get_indices (path);
((Snes9xCheats *) data)->row_deleted (indices[0]); ((Snes9xCheats *) data)->row_deleted (indices[0]);
return;
} }
void void
@ -193,8 +183,6 @@ Snes9xCheats::Snes9xCheats ()
gtk_widget_realize (window); gtk_widget_realize (window);
signal_connect (callbacks); signal_connect (callbacks);
return;
} }
Snes9xCheats::~Snes9xCheats () Snes9xCheats::~Snes9xCheats ()
@ -202,8 +190,6 @@ Snes9xCheats::~Snes9xCheats ()
gtk_widget_destroy (window); gtk_widget_destroy (window);
g_object_unref (store); g_object_unref (store);
return;
} }
void void
@ -234,8 +220,6 @@ Snes9xCheats::show ()
gtk_dialog_run (GTK_DIALOG (window)); gtk_dialog_run (GTK_DIALOG (window));
top_level->unpause_from_focus_change (); top_level->unpause_from_focus_change ();
return;
} }
static void cheat_move (int src, int dst) static void cheat_move (int src, int dst)
@ -359,8 +343,6 @@ Snes9xCheats::refresh_tree_view ()
} }
enable_dnd (true); enable_dnd (true);
return;
} }
void void
@ -398,8 +380,6 @@ Snes9xCheats::add_code ()
GtkScrolledWindow *scroll = GTK_SCROLLED_WINDOW (get_widget ("cheat_scrolledwindow")); GtkScrolledWindow *scroll = GTK_SCROLLED_WINDOW (get_widget ("cheat_scrolledwindow"));
GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (scroll); GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (scroll);
gtk_adjustment_set_value (adj, gtk_adjustment_get_upper (adj)); gtk_adjustment_set_value (adj, gtk_adjustment_get_upper (adj));
return;
} }
void void
@ -417,8 +397,6 @@ Snes9xCheats::remove_code ()
enable_dnd (true); enable_dnd (true);
S9xDeleteCheatGroup (index); S9xDeleteCheatGroup (index);
return;
} }
void void
@ -428,8 +406,6 @@ Snes9xCheats::delete_all_cheats ()
S9xDeleteCheats (); S9xDeleteCheats ();
gtk_list_store_clear (store); gtk_list_store_clear (store);
enable_dnd (true); enable_dnd (true);
return;
} }
void void
@ -500,8 +476,6 @@ Snes9xCheats::search_database ()
"translation or modified copy, you may be able to find and manually enter the codes.")); "translation or modified copy, you may be able to find and manually enter the codes."));
gtk_dialog_run (GTK_DIALOG (dialog)); gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog)); gtk_widget_destroy (GTK_WIDGET (dialog));
return;
} }
void void
@ -521,8 +495,6 @@ Snes9xCheats::row_activated (GtkTreePath *path)
set_entry_text ("code_entry", cheat_text); set_entry_text ("code_entry", cheat_text);
delete[] cheat_text; delete[] cheat_text;
set_entry_text ("description_entry", Cheat.g[indices[0]].name); set_entry_text ("description_entry", Cheat.g[indices[0]].name);
return;
} }
void void
@ -539,8 +511,6 @@ Snes9xCheats::toggle_code (const gchar *path, int enabled)
S9xEnableCheatGroup (index); S9xEnableCheatGroup (index);
else else
S9xDisableCheatGroup (index); S9xDisableCheatGroup (index);
return;
} }
void void
@ -572,8 +542,6 @@ Snes9xCheats::update_code ()
gtk_widget_grab_focus (get_widget ("code_entry")); gtk_widget_grab_focus (get_widget ("code_entry"));
refresh_tree_view (); refresh_tree_view ();
return;
} }
void void
@ -586,7 +554,5 @@ Snes9xCheats::disable_all ()
} }
refresh_tree_view (); refresh_tree_view ();
return;
} }

View File

@ -385,8 +385,6 @@ void S9xProcessEvents (bool8 block)
S9xReleaseJoysticks (); S9xReleaseJoysticks ();
} }
#endif #endif
return;
} }
#ifdef USE_JOYSTICK #ifdef USE_JOYSTICK
@ -500,8 +498,6 @@ JoyDevice::JoyDevice (unsigned int device_num)
num_hats); num_hats);
memset (axis, 0, sizeof (int) * num_axes); memset (axis, 0, sizeof (int) * num_axes);
return;
} }
JoyDevice::~JoyDevice () JoyDevice::~JoyDevice ()

View File

@ -63,8 +63,6 @@ void
S9xSetEndianess (int type) S9xSetEndianess (int type)
{ {
endianess = type; endianess = type;
return;
} }
double double
@ -171,8 +169,6 @@ S9xApplyAspect (int &s_width, /* Output: x */
s_height = y; s_height = y;
d_width = w; d_width = w;
d_height = h; d_height = h;
return;
} }
void void
@ -181,8 +177,6 @@ S9xRegisterYUVTables (uint8 *y, uint8 *u, uint8 *v)
y_table = y; y_table = y;
u_table = u; u_table = u;
v_table = v; v_table = v;
return;
} }
/* YUY2 in LSB first format */ /* YUY2 in LSB first format */
@ -237,8 +231,6 @@ internal_convert_16_yuv (void *src_buffer,
} }
} }
} }
return;
} }
static void static void
@ -464,8 +456,6 @@ internal_convert_mask (void *src_buffer,
break; break;
} }
} }
return;
} }
static void static void
@ -562,8 +552,6 @@ internal_convert (void *src_buffer,
} }
} }
} }
return;
} }
static void static void
@ -622,8 +610,6 @@ S9xForceHires (void *buffer,
height *= 2; height *= 2;
} }
return;
} }
#undef AVERAGE_565 #undef AVERAGE_565
@ -652,8 +638,6 @@ S9xMergeHires (void *buffer,
} }
width >>= 1; width >>= 1;
return;
} }
#if 0 #if 0
@ -687,8 +671,6 @@ S9xBlendHires (void *buffer, int pitch, int &width, int &height)
memcpy (input, tmp, pitch); memcpy (input, tmp, pitch);
} }
return;
} }
#endif #endif
@ -719,8 +701,6 @@ filter_2x (void *src,
(uint8 *) dst + (y * 2) * dst_pitch, (uint8 *) dst + (y * 2) * dst_pitch,
width * 2 * 2); width * 2 * 2);
} }
return;
} }
void void
@ -754,8 +734,6 @@ filter_3x (void *src,
width * 2 * 3); width * 2 * 3);
} }
} }
return;
} }
void void
@ -790,8 +768,6 @@ filter_4x (void *src,
width * 2 * 4); width * 2 * 4);
} }
} }
return;
} }
void void
@ -824,11 +800,8 @@ filter_scanlines (void *src_buffer,
dst_a += dst_pitch; dst_a += dst_pitch;
dst_b += dst_pitch; dst_b += dst_pitch;
} }
return;
} }
void void
get_filter_scale (int &width, int &height) get_filter_scale (int &width, int &height)
{ {
@ -944,8 +917,6 @@ get_filter_scale (int &width, int &height)
height *= 2; height *= 2;
break; break;
} }
return;
} }
static void static void
@ -1163,8 +1134,6 @@ internal_filter (uint8 *src_buffer,
} }
get_filter_scale (width, height); get_filter_scale (width, height);
return;
} }
static void static void
@ -1218,8 +1187,6 @@ thread_worker (gpointer data,
} }
job->complete = 1; job->complete = 1;
return;
} }
static void static void
@ -1233,8 +1200,6 @@ create_thread_pool ()
TRUE, TRUE,
NULL); NULL);
} }
return;
} }
static void static void
@ -1291,8 +1256,6 @@ internal_threaded_convert (void *src_buffer,
sched_yield (); sched_yield ();
} }
return;
} }
static void static void
@ -1358,8 +1321,6 @@ internal_threaded_convert_mask (void *src_buffer,
sched_yield (); sched_yield ();
} }
return;
} }
static void static void
@ -1423,8 +1384,6 @@ internal_threaded_filter (uint8 *src_buffer,
} }
get_filter_scale (width, height); get_filter_scale (width, height);
return;
} }
void void
@ -1450,8 +1409,6 @@ S9xFilter (uint8 *src_buffer,
dst_pitch, dst_pitch,
width, width,
height); height);
return;
} }
void void
@ -1477,7 +1434,6 @@ S9xConvertYUV (void *src_buffer,
dst_pitch, dst_pitch,
width, width,
height); height);
return;
} }
void void
@ -1505,7 +1461,6 @@ S9xConvert (void *src,
width, width,
height, height,
bpp); bpp);
return;
} }
void void
@ -1542,15 +1497,12 @@ S9xConvertMask (void *src,
gshift, gshift,
bshift, bshift,
bpp); bpp);
return;
} }
void void
S9xDisplayRefresh (int width, int height) S9xDisplayRefresh (int width, int height)
{ {
driver->refresh (width, height); driver->refresh (width, height);
return;
} }
static void static void
@ -1560,8 +1512,6 @@ ntsc_filter_init ()
scanline_mask = scanline_masks [gui_config->ntsc_scanline_intensity]; scanline_mask = scanline_masks [gui_config->ntsc_scanline_intensity];
snes_ntsc_init (&snes_ntsc, &gui_config->ntsc_setup); snes_ntsc_init (&snes_ntsc, &gui_config->ntsc_setup);
return;
} }
void void
@ -1573,8 +1523,6 @@ S9xDisplayReconfigure ()
{ {
g_thread_pool_set_max_threads (pool, gui_config->num_threads - 1, NULL); g_thread_pool_set_max_threads (pool, gui_config->num_threads - 1, NULL);
} }
return;
} }
void void
@ -1608,8 +1556,6 @@ S9xQueryDrivers ()
gui_config->xrr_screen_resources->crtcs[0]); gui_config->xrr_screen_resources->crtcs[0]);
} }
#endif #endif
return;
} }
bool8 bool8
@ -1747,8 +1693,6 @@ S9xInitDriver ()
} }
pool = NULL; pool = NULL;
return;
} }
S9xDisplayDriver * S9xDisplayDriver *
@ -1769,16 +1713,12 @@ S9xInitDisplay (int argc, char **argv)
S9xInitDriver (); S9xInitDriver ();
S9xGraphicsInit (); S9xGraphicsInit ();
S9xDisplayReconfigure (); S9xDisplayReconfigure ();
return;
} }
void void
S9xDisplayClearBuffers () S9xDisplayClearBuffers ()
{ {
driver->clear_buffers (); driver->clear_buffers ();
return;
} }
void void
@ -1792,8 +1732,6 @@ S9xDeinitDisplay ()
if (pool) if (pool)
g_thread_pool_free (pool, FALSE, TRUE); g_thread_pool_free (pool, FALSE, TRUE);
return;
} }
void void
@ -1820,8 +1758,6 @@ S9xReinitDisplay ()
driver->push_buffer (buffer); driver->push_buffer (buffer);
free (buffer); free (buffer);
return;
} }
bool8 bool8
@ -1840,19 +1776,16 @@ S9xInitUpdate ()
void void
S9xSetPalette () S9xSetPalette ()
{ {
return;
} }
void void
S9xTextMode () S9xTextMode ()
{ {
return;
} }
void void
S9xGraphicsMode () S9xGraphicsMode ()
{ {
return;
} }

View File

@ -11,8 +11,6 @@ S9xGTKDisplayDriver::S9xGTKDisplayDriver (Snes9xWindow *window,
this->window = window; this->window = window;
this->config = config; this->config = config;
this->drawing_area = GTK_WIDGET (window->drawing_area); this->drawing_area = GTK_WIDGET (window->drawing_area);
return;
} }
void void
@ -58,8 +56,6 @@ S9xGTKDisplayDriver::update (int width, int height, int yoffset)
S9xApplyAspect (x, y, w, h); S9xApplyAspect (x, y, w, h);
output (final_buffer, final_pitch, x, y, width, height, w, h); output (final_buffer, final_pitch, x, y, width, height, w, h);
return;
} }
void void
@ -113,8 +109,6 @@ S9xGTKDisplayDriver::output (void *src,
window->release_cairo (); window->release_cairo ();
window->set_mouseable_area (x, y, width, height); window->set_mouseable_area (x, y, width, height);
return;
} }
int int
@ -143,8 +137,6 @@ S9xGTKDisplayDriver::deinit ()
free (buffer[0]); free (buffer[0]);
free (buffer[1]); free (buffer[1]);
return;
} }
void void
@ -197,16 +189,12 @@ S9xGTKDisplayDriver::clear ()
cairo_fill (cr); cairo_fill (cr);
window->release_cairo (); window->release_cairo ();
return;
} }
void void
S9xGTKDisplayDriver::refresh (int width, int height) S9xGTKDisplayDriver::refresh (int width, int height)
{ {
clear (); clear ();
return;
} }
uint16 * uint16 *
@ -225,8 +213,6 @@ void
S9xGTKDisplayDriver::push_buffer (uint16 *src) S9xGTKDisplayDriver::push_buffer (uint16 *src)
{ {
memmove (GFX.Screen, src, image_size); memmove (GFX.Screen, src, image_size);
return;
} }
void void
@ -234,6 +220,4 @@ S9xGTKDisplayDriver::clear_buffers ()
{ {
memset (buffer[0], 0, image_padded_size); memset (buffer[0], 0, image_padded_size);
memset (buffer[1], 0, scaled_padded_size); memset (buffer[1], 0, scaled_padded_size);
return;
} }

View File

@ -32,8 +32,6 @@ S9xXVDisplayDriver::S9xXVDisplayDriver (Snes9xWindow *window,
display = display =
gdk_x11_display_get_xdisplay (gtk_widget_get_display (drawing_area)); gdk_x11_display_get_xdisplay (gtk_widget_get_display (drawing_area));
last_known_width = last_known_height = -1; last_known_width = last_known_height = -1;
return;
} }
void void
@ -41,8 +39,6 @@ S9xXVDisplayDriver::resize_window (int width, int height)
{ {
gdk_window_destroy (gdk_window); gdk_window_destroy (gdk_window);
create_window (width, height); create_window (width, height);
return;
} }
void void
@ -178,8 +174,6 @@ S9xXVDisplayDriver::update (int width, int height, int yoffset)
top_level->set_mouseable_area (dst_x, dst_y, dst_width, dst_height); top_level->set_mouseable_area (dst_x, dst_y, dst_width, dst_height);
XSync (display, False); XSync (display, False);
return;
} }
void void
@ -227,8 +221,6 @@ S9xXVDisplayDriver::update_image_size (int width, int height)
desired_width = width; desired_width = width;
desired_height = height; desired_height = height;
} }
return;
} }
int int
@ -491,8 +483,6 @@ S9xXVDisplayDriver::deinit ()
padded_buffer[0] = NULL; padded_buffer[0] = NULL;
padded_buffer[1] = NULL; padded_buffer[1] = NULL;
return;
} }
void void
@ -546,16 +536,12 @@ S9xXVDisplayDriver::clear ()
} }
XSync (display, False); XSync (display, False);
return;
} }
void void
S9xXVDisplayDriver::refresh (int width, int height) S9xXVDisplayDriver::refresh (int width, int height)
{ {
clear (); clear ();
return;
} }
uint16 * uint16 *
@ -574,8 +560,6 @@ void
S9xXVDisplayDriver::push_buffer (uint16 *src) S9xXVDisplayDriver::push_buffer (uint16 *src)
{ {
memmove (GFX.Screen, src, image_size); memmove (GFX.Screen, src, image_size);
return;
} }
void void
@ -605,8 +589,6 @@ S9xXVDisplayDriver::clear_buffers ()
{ {
memset (xv_image->data, 0, xv_image->data_size); memset (xv_image->data, 0, xv_image->data_size);
} }
return;
} }
int int

View File

@ -71,8 +71,6 @@ _splitpath (const char *path, char *drive, char *dir, char *fname, char *ext)
*ext = '\0'; *ext = '\0';
} }
} }
return;
} }
void void
@ -97,8 +95,6 @@ _makepath (char *path,
strcat (path, "."); strcat (path, ".");
strcat (path, ext); strcat (path, ext);
} }
return;
} }
const char * const char *
@ -371,7 +367,6 @@ extern "C" char *osd_GetPackDir ()
void void
S9xLoadSDD1Data () S9xLoadSDD1Data ()
{ {
return;
} }
void void
@ -379,7 +374,6 @@ S9xAutoSaveSRAM ()
{ {
Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR)); Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR));
S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR)); S9xSaveCheatFile (S9xGetFilename (".cht", CHEAT_DIR));
return;
} }
void void
@ -396,8 +390,6 @@ S9xLoadState (const char *filename)
{ {
fprintf (stderr, "Failed to load state file: %s\n", filename); fprintf (stderr, "Failed to load state file: %s\n", filename);
} }
return;
} }
void void
@ -412,8 +404,6 @@ S9xSaveState (const char *filename)
{ {
fprintf (stderr, "Couldn't save state file: %s\n", filename); fprintf (stderr, "Couldn't save state file: %s\n", filename);
} }
return;
} }
char * char *
@ -511,8 +501,6 @@ S9xQuickSaveSlot (int slot)
S9xSetInfoString (buf); S9xSetInfoString (buf);
} }
return;
} }
void void
@ -563,7 +551,5 @@ S9xQuickLoadSlot (int slot)
S9xMessage (S9X_ERROR, S9xMessage (S9X_ERROR,
S9X_FREEZE_FILE_NOT_FOUND, S9X_FREEZE_FILE_NOT_FOUND,
"Freeze file not found"); "Freeze file not found");
return;
} }

View File

@ -25,8 +25,6 @@ S9xNetplayPreconnect ()
NetPlay.MaxBehindFrameCount = gui_config->netplay_max_frame_loss; NetPlay.MaxBehindFrameCount = gui_config->netplay_max_frame_loss;
NetPlay.Waiting4EmulationThread = FALSE; NetPlay.Waiting4EmulationThread = FALSE;
return;
} }
static void static void
@ -75,8 +73,6 @@ S9xNetplayConnect ()
CPU.Flags = flags; CPU.Flags = flags;
top_level->configure_widgets (); top_level->configure_widgets ();
return;
} }
void void
@ -84,8 +80,6 @@ S9xNetplaySyncClients ()
{ {
if (Settings.NetPlay && Settings.NetPlayServer) if (Settings.NetPlay && Settings.NetPlayServer)
S9xNPServerQueueSyncAll (); S9xNPServerQueueSyncAll ();
return;
} }
void void
@ -96,8 +90,6 @@ S9xNetplayStopServer ()
g_thread_join (npthread); g_thread_join (npthread);
Settings.NetPlayServer = FALSE; Settings.NetPlayServer = FALSE;
gui_config->netplay_server_up = FALSE; gui_config->netplay_server_up = FALSE;
return;
} }
void void
@ -118,8 +110,6 @@ S9xNetplayDisconnect ()
NetPlay.Paused = FALSE; NetPlay.Paused = FALSE;
top_level->configure_widgets (); top_level->configure_widgets ();
return;
} }
static gpointer static gpointer
@ -168,8 +158,6 @@ S9xNetplayStartServer ()
CPU.Flags = flags; CPU.Flags = flags;
top_level->configure_widgets (); top_level->configure_widgets ();
return;
} }
void void
@ -201,8 +189,6 @@ S9xNetplayDialogOpen ()
delete np_dialog; delete np_dialog;
top_level->unpause_from_focus_change (); top_level->unpause_from_focus_change ();
return;
} }
int int
@ -338,8 +324,6 @@ S9xNetplayPop ()
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
MovieSetJoypad (i, local_joypads[i]); MovieSetJoypad (i, local_joypads[i]);
return;
} }

View File

@ -17,8 +17,6 @@ event_browse_clicked (GtkButton *button, gpointer data)
g_free (filename); g_free (filename);
} }
return;
} }
static void static void
@ -27,8 +25,6 @@ event_clear_clicked (GtkButton *button, gpointer data)
Snes9xNetplayDialog *np_dialog = (Snes9xNetplayDialog *) data; Snes9xNetplayDialog *np_dialog = (Snes9xNetplayDialog *) data;
gtk_entry_set_text (GTK_ENTRY (np_dialog->get_widget ("rom_image")), ""); gtk_entry_set_text (GTK_ENTRY (np_dialog->get_widget ("rom_image")), "");
return;
} }
static void static void
@ -53,8 +49,6 @@ Snes9xNetplayDialog::Snes9xNetplayDialog (Snes9xConfig *config) :
signal_connect (callbacks); signal_connect (callbacks);
this->config = config; this->config = config;
return;
} }
void void
@ -75,8 +69,6 @@ Snes9xNetplayDialog::update_state ()
enable_widget ("sync_reset", FALSE); enable_widget ("sync_reset", FALSE);
enable_widget ("send_image", FALSE); enable_widget ("send_image", FALSE);
} }
return;
} }
void void
@ -93,8 +85,6 @@ Snes9xNetplayDialog::settings_to_dialog ()
set_check ("host_radio", config->netplay_is_server); set_check ("host_radio", config->netplay_is_server);
update_state (); update_state ();
return;
} }
void void
@ -110,8 +100,6 @@ Snes9xNetplayDialog::settings_from_dialog ()
config->netplay_is_server = get_check ("host_radio"); config->netplay_is_server = get_check ("host_radio");
config->save_config_file (); config->save_config_file ();
return;
} }
int int

View File

@ -53,8 +53,6 @@ static void
event_sram_folder_browse (GtkButton *widget, gpointer data) event_sram_folder_browse (GtkButton *widget, gpointer data)
{ {
((Snes9xPreferences *) data)->browse_folder_dialog (); ((Snes9xPreferences *) data)->browse_folder_dialog ();
return;
} }
#ifdef USE_JOYSTICK #ifdef USE_JOYSTICK
@ -62,8 +60,6 @@ static void
event_calibrate (GtkButton *widget, gpointer data) event_calibrate (GtkButton *widget, gpointer data)
{ {
((Snes9xPreferences *) data)->calibration_dialog (); ((Snes9xPreferences *) data)->calibration_dialog ();
return;
} }
#endif #endif
@ -99,8 +95,6 @@ event_control_toggle (GtkToggleButton *widget, gpointer data)
gtk_toggle_button_set_active (widget, state); gtk_toggle_button_set_active (widget, state);
toggle_lock = 0; toggle_lock = 0;
return;
} }
static gboolean static gboolean
@ -163,8 +157,6 @@ event_ntsc_composite_preset (GtkButton *widget, gpointer data)
Snes9xPreferences *window = (Snes9xPreferences *) data; Snes9xPreferences *window = (Snes9xPreferences *) data;
window->config->ntsc_setup = snes_ntsc_composite; window->config->ntsc_setup = snes_ntsc_composite;
window->load_ntsc_settings (); window->load_ntsc_settings ();
return;
} }
static void static void
@ -173,8 +165,6 @@ event_ntsc_svideo_preset (GtkButton *widget, gpointer data)
Snes9xPreferences *window = (Snes9xPreferences *) data; Snes9xPreferences *window = (Snes9xPreferences *) data;
window->config->ntsc_setup = snes_ntsc_svideo; window->config->ntsc_setup = snes_ntsc_svideo;
window->load_ntsc_settings (); window->load_ntsc_settings ();
return;
} }
static void static void
@ -183,8 +173,6 @@ event_ntsc_rgb_preset (GtkButton *widget, gpointer data)
Snes9xPreferences *window = (Snes9xPreferences *) data; Snes9xPreferences *window = (Snes9xPreferences *) data;
window->config->ntsc_setup = snes_ntsc_rgb; window->config->ntsc_setup = snes_ntsc_rgb;
window->load_ntsc_settings (); window->load_ntsc_settings ();
return;
} }
static void static void
@ -193,8 +181,6 @@ event_ntsc_monochrome_preset (GtkButton *widget, gpointer data)
Snes9xPreferences *window = (Snes9xPreferences *) data; Snes9xPreferences *window = (Snes9xPreferences *) data;
window->config->ntsc_setup = snes_ntsc_monochrome; window->config->ntsc_setup = snes_ntsc_monochrome;
window->load_ntsc_settings (); window->load_ntsc_settings ();
return;
} }
@ -202,16 +188,12 @@ static void
event_swap_with (GtkButton *widget, gpointer data) event_swap_with (GtkButton *widget, gpointer data)
{ {
((Snes9xPreferences *) data)->swap_with (); ((Snes9xPreferences *) data)->swap_with ();
return;
} }
static void static void
event_reset_current_joypad (GtkButton *widget, gpointer data) event_reset_current_joypad (GtkButton *widget, gpointer data)
{ {
((Snes9xPreferences *) data)->reset_current_joypad (); ((Snes9xPreferences *) data)->reset_current_joypad ();
return;
} }
static void static void
@ -263,8 +245,6 @@ event_shader_select (GtkButton *widget, gpointer data)
} }
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return;
#endif #endif
} }
@ -275,8 +255,6 @@ event_game_data_clear (GtkEntry *entry,
gpointer user_data) gpointer user_data)
{ {
gtk_entry_set_text (entry, SAME_GAME); gtk_entry_set_text (entry, SAME_GAME);
return;
} }
static void static void
@ -325,8 +303,6 @@ event_game_data_browse (GtkButton *widget, gpointer data)
} }
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return;
} }
static void static void
@ -357,8 +333,6 @@ event_hw_accel_changed (GtkComboBox *widget, gpointer data)
gtk_widget_hide (window->get_widget ("opengl_frame")); gtk_widget_hide (window->get_widget ("opengl_frame"));
break; break;
} }
return;
} }
static void static void
@ -402,9 +376,6 @@ event_scale_method_changed (GtkComboBox *widget, gpointer user_data)
{ {
gtk_widget_hide (window->get_widget ("scanline_filter_frame")); gtk_widget_hide (window->get_widget ("scanline_filter_frame"));
} }
return;
} }
static void static void
@ -413,8 +384,6 @@ event_control_combo_changed (GtkComboBox *widget, gpointer user_data)
Snes9xPreferences *window = (Snes9xPreferences *) user_data; Snes9xPreferences *window = (Snes9xPreferences *) user_data;
window->bindings_to_dialog (gtk_combo_box_get_active (widget)); window->bindings_to_dialog (gtk_combo_box_get_active (widget));
return;
} }
#ifdef USE_JOYSTICK #ifdef USE_JOYSTICK
@ -469,8 +438,6 @@ Snes9xPreferences::calibration_dialog ()
gtk_dialog_run (GTK_DIALOG (dialog)); gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return;
} }
#endif #endif
@ -485,8 +452,6 @@ event_input_rate_changed (GtkRange *range, gpointer data)
snprintf (text, 256, "%.4f hz", value); snprintf (text, 256, "%.4f hz", value);
gtk_label_set_text (label, text); gtk_label_set_text (label, text);
return;
} }
void void
@ -575,8 +540,6 @@ event_about_clicked (GtkButton *widget, gpointer data)
gtk_dialog_run (GTK_DIALOG (about_dialog->get_window ())); gtk_dialog_run (GTK_DIALOG (about_dialog->get_window ()));
delete about_dialog; delete about_dialog;
return;
} }
Snes9xPreferences::Snes9xPreferences (Snes9xConfig *config) : Snes9xPreferences::Snes9xPreferences (Snes9xConfig *config) :
@ -623,15 +586,11 @@ Snes9xPreferences::Snes9xPreferences (Snes9xConfig *config) :
get_widget ("relative_video_rate"), get_widget ("relative_video_rate"),
NULL, NULL,
(GConnectFlags) 0); (GConnectFlags) 0);
return;
} }
Snes9xPreferences::~Snes9xPreferences () Snes9xPreferences::~Snes9xPreferences ()
{ {
delete[] mode_indices; delete[] mode_indices;
return;
} }
void void
@ -648,8 +607,6 @@ Snes9xPreferences::load_ntsc_settings ()
set_slider ("ntsc_resolution", config->ntsc_setup.resolution); set_slider ("ntsc_resolution", config->ntsc_setup.resolution);
set_slider ("ntsc_saturation", config->ntsc_setup.saturation); set_slider ("ntsc_saturation", config->ntsc_setup.saturation);
set_slider ("ntsc_sharpness", config->ntsc_setup.sharpness); set_slider ("ntsc_sharpness", config->ntsc_setup.sharpness);
return;
} }
void void
@ -666,8 +623,6 @@ Snes9xPreferences::store_ntsc_settings ()
config->ntsc_setup.resolution = get_slider ("ntsc_resolution"); config->ntsc_setup.resolution = get_slider ("ntsc_resolution");
config->ntsc_setup.saturation = get_slider ("ntsc_saturation"); config->ntsc_setup.saturation = get_slider ("ntsc_saturation");
config->ntsc_setup.sharpness = get_slider ("ntsc_sharpness"); config->ntsc_setup.sharpness = get_slider ("ntsc_sharpness");
return;
} }
void void
@ -815,8 +770,6 @@ Snes9xPreferences::move_settings_to_dialog ()
set_check ("cpu_overclock", Settings.OneClockCycle != 6); set_check ("cpu_overclock", Settings.OneClockCycle != 6);
set_check ("remove_sprite_limit", Settings.MaxSpriteTilesPerLine != 34); set_check ("remove_sprite_limit", Settings.MaxSpriteTilesPerLine != 34);
#endif #endif
return;
} }
void void
@ -1032,8 +985,6 @@ Snes9xPreferences::get_settings_from_dialog ()
if (config->default_esc_behavior != ESC_TOGGLE_MENUBAR) if (config->default_esc_behavior != ESC_TOGGLE_MENUBAR)
top_level->leave_fullscreen_mode (); top_level->leave_fullscreen_mode ();
return;
} }
int int
@ -1098,8 +1049,6 @@ Snes9xPreferences::browse_folder_dialog ()
} }
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
return;
} }
void void
@ -1248,8 +1197,6 @@ Snes9xPreferences::show ()
#endif #endif
gtk_widget_destroy (window); gtk_widget_destroy (window);
return;
} }
void void
@ -1267,8 +1214,6 @@ Snes9xPreferences::focus_next ()
gtk_widget_grab_focus (get_widget (b_links [next].button_name)); gtk_widget_grab_focus (get_widget (b_links [next].button_name));
else else
gtk_widget_grab_focus (get_widget ("cancel_button")); gtk_widget_grab_focus (get_widget ("cancel_button"));
return;
} }
void void
@ -1283,8 +1228,6 @@ Snes9xPreferences::swap_with ()
pad[dest_joypad] = mediator; pad[dest_joypad] = mediator;
bindings_to_dialog (source_joypad); bindings_to_dialog (source_joypad);
return;
} }
void void
@ -1298,8 +1241,6 @@ Snes9xPreferences::reset_current_joypad ()
} }
bindings_to_dialog (joypad); bindings_to_dialog (joypad);
return;
} }
void void
@ -1341,8 +1282,6 @@ Snes9xPreferences::store_binding (const char *string, Binding binding)
focus_next (); focus_next ();
bindings_to_dialog (get_combo ("control_combo")); bindings_to_dialog (get_combo ("control_combo"));
return;
} }
int int
@ -1376,6 +1315,4 @@ Snes9xPreferences::bindings_to_dialog (int joypad)
shortcut[i - NUM_JOYPAD_LINKS].to_string (name); shortcut[i - NUM_JOYPAD_LINKS].to_string (name);
set_entry_text (b_links[i].button_name, name); set_entry_text (b_links[i].button_name, name);
} }
return;
} }

View File

@ -316,8 +316,6 @@ event_fullscreen (GtkWidget *widget, gpointer data)
window->enter_fullscreen_mode (); window->enter_fullscreen_mode ();
else else
window->leave_fullscreen_mode (); window->leave_fullscreen_mode ();
return;
} }
@ -325,40 +323,30 @@ static void
event_exact_pixels_1x (GtkWidget *widget, gpointer data) event_exact_pixels_1x (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->resize_to_multiple (1); ((Snes9xWindow *) data)->resize_to_multiple (1);
return;
} }
static void static void
event_exact_pixels_2x (GtkWidget *widget, gpointer data) event_exact_pixels_2x (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->resize_to_multiple (2); ((Snes9xWindow *) data)->resize_to_multiple (2);
return;
} }
static void static void
event_exact_pixels_3x (GtkWidget *widget, gpointer data) event_exact_pixels_3x (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->resize_to_multiple (3); ((Snes9xWindow *) data)->resize_to_multiple (3);
return;
} }
static void static void
event_exact_pixels_4x (GtkWidget *widget, gpointer data) event_exact_pixels_4x (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->resize_to_multiple (4); ((Snes9xWindow *) data)->resize_to_multiple (4);
return;
} }
static void static void
event_exact_pixels_5x (GtkWidget *widget, gpointer data) event_exact_pixels_5x (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->resize_to_multiple (5); ((Snes9xWindow *) data)->resize_to_multiple (5);
return;
} }
static void static void
@ -372,7 +360,6 @@ event_record_movie (GtkWidget *widget, gpointer data)
MOVIE_OPT_FROM_RESET, MOVIE_OPT_FROM_RESET,
NULL, NULL,
0); 0);
return;
} }
static void static void
@ -382,8 +369,6 @@ event_open_movie (GtkWidget *widget, gpointer data)
S9xMovieStop (FALSE); S9xMovieStop (FALSE);
S9xMovieOpen (S9xChooseMovieFilename (TRUE), FALSE); S9xMovieOpen (S9xChooseMovieFilename (TRUE), FALSE);
return;
} }
static void static void
@ -394,7 +379,6 @@ event_shader_parameters (GtkWidget *widget, gpointer data)
gtk_shader_parameters_dialog (window->get_window ()); gtk_shader_parameters_dialog (window->get_window ());
#endif #endif
return;
} }
static void static void
@ -402,8 +386,6 @@ event_stop_recording (GtkWidget *widget, gpointer data)
{ {
if (S9xMovieActive ()) if (S9xMovieActive ())
S9xMovieStop (FALSE); S9xMovieStop (FALSE);
return;
} }
static void static void
@ -412,24 +394,18 @@ event_jump_to_frame (GtkWidget *widget, gpointer data)
Snes9xWindow *window = (Snes9xWindow *) data; Snes9xWindow *window = (Snes9xWindow *) data;
window->movie_seek_dialog (); window->movie_seek_dialog ();
return;
} }
static void static void
event_reset (GtkWidget *widget, gpointer data) event_reset (GtkWidget *widget, gpointer data)
{ {
S9xSoftReset (); S9xSoftReset ();
return;
} }
static void static void
event_hard_reset (GtkWidget *widget, gpointer data) event_hard_reset (GtkWidget *widget, gpointer data)
{ {
S9xReset (); S9xReset ();
return;
} }
static void static void
@ -441,16 +417,12 @@ event_save_state (GtkWidget *widget, gpointer data)
slot = atoi (&(name[11])); slot = atoi (&(name[11]));
S9xQuickSaveSlot (slot); S9xQuickSaveSlot (slot);
return;
} }
static void static void
event_save_state_file (GtkWidget *widget, gpointer data) event_save_state_file (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->save_state_dialog (); ((Snes9xWindow *) data)->save_state_dialog ();
return;
} }
static void static void
@ -462,16 +434,12 @@ event_load_state (GtkWidget *widget, gpointer data)
slot = atoi (&(name[11])); slot = atoi (&(name[11]));
S9xQuickLoadSlot (slot); S9xQuickLoadSlot (slot);
return;
} }
static void static void
event_load_state_undo (GtkWidget *widget, gpointer data) event_load_state_undo (GtkWidget *widget, gpointer data)
{ {
S9xUnfreezeGame (S9xGetFilename (".undo", SNAPSHOT_DIR)); S9xUnfreezeGame (S9xGetFilename (".undo", SNAPSHOT_DIR));
return;
} }
@ -479,16 +447,12 @@ static void
event_load_state_file (GtkWidget *widget, gpointer data) event_load_state_file (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->load_state_dialog (); ((Snes9xWindow *) data)->load_state_dialog ();
return;
} }
static void static void
event_open_rom (GtkWidget *widget, gpointer data) event_open_rom (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->open_rom_dialog (); ((Snes9xWindow *) data)->open_rom_dialog ();
return;
} }
static void static void
@ -502,16 +466,12 @@ event_recent_open (GtkRecentChooser *chooser, gpointer data)
g_free (filename); g_free (filename);
g_free (uri); g_free (uri);
return;
} }
static void static void
event_save_spc (GtkWidget *widget, gpointer data) event_save_spc (GtkWidget *widget, gpointer data)
{ {
((Snes9xWindow *) data)->save_spc_dialog (); ((Snes9xWindow *) data)->save_spc_dialog ();
return;
} }
static gboolean static gboolean
@ -577,8 +537,6 @@ event_port (GtkWidget *widget, gpointer data)
{ {
S9xSetController (1, CTL_MP5, 1, 2, 3, 4); S9xSetController (1, CTL_MP5, 1, 2, 3, 4);
} }
return;
} }
Snes9xWindow::Snes9xWindow (Snes9xConfig *config) : Snes9xWindow::Snes9xWindow (Snes9xConfig *config) :
@ -720,8 +678,6 @@ Snes9xWindow::Snes9xWindow (Snes9xConfig *config) :
gdk_window_set_cursor (gtk_widget_get_window (window), default_cursor); gdk_window_set_cursor (gtk_widget_get_window (window), default_cursor);
resize (config->window_width, config->window_height); resize (config->window_width, config->window_height);
return;
} }
extern const gtk_splash_t gtk_splash; extern const gtk_splash_t gtk_splash;
@ -790,8 +746,6 @@ Snes9xWindow::expose ()
S9xRealDeinitUpdate (last_width, last_height); S9xRealDeinitUpdate (last_width, last_height);
} }
#endif #endif
return;
} }
void void
@ -811,8 +765,6 @@ Snes9xWindow::focus_notify (int state)
unpause_from_focus_change (); unpause_from_focus_change ();
paused_from_focus_loss = FALSE; paused_from_focus_loss = FALSE;
} }
return;
} }
void void
@ -873,8 +825,6 @@ Snes9xWindow::open_multicart_dialog ()
delete dialog; delete dialog;
unpause_from_focus_change (); unpause_from_focus_change ();
return;
} }
const char * const char *
@ -979,8 +929,6 @@ Snes9xWindow::open_rom_dialog ()
} }
unpause_from_focus_change (); unpause_from_focus_change ();
return;
} }
int int
@ -1109,8 +1057,6 @@ Snes9xWindow::load_state_dialog ()
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
this->unpause_from_focus_change (); this->unpause_from_focus_change ();
return;
} }
void void
@ -1156,8 +1102,6 @@ Snes9xWindow::movie_seek_dialog ()
delete seek_dialog; delete seek_dialog;
unpause_from_focus_change (); unpause_from_focus_change ();
return;
} }
void void
@ -1234,8 +1178,6 @@ Snes9xWindow::save_state_dialog ()
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
this->unpause_from_focus_change (); this->unpause_from_focus_change ();
return;
} }
void void
@ -1318,8 +1260,6 @@ Snes9xWindow::save_spc_dialog ()
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
this->unpause_from_focus_change (); this->unpause_from_focus_change ();
return;
} }
void void
@ -1330,8 +1270,6 @@ Snes9xWindow::set_menu_item_selected (const char *name)
item = GTK_CHECK_MENU_ITEM (get_widget (name)); item = GTK_CHECK_MENU_ITEM (get_widget (name));
gtk_check_menu_item_set_active (item, 1); gtk_check_menu_item_set_active (item, 1);
return;
} }
static gboolean static gboolean
@ -1353,8 +1291,6 @@ Snes9xWindow::show_status_message (const char *message)
gtk_statusbar_push (statusbar, gtk_statusbar_get_context_id (statusbar, "info"), message); gtk_statusbar_push (statusbar, gtk_statusbar_get_context_id (statusbar, "info"), message);
g_timeout_add (2000, statusbar_timeout, statusbar); g_timeout_add (2000, statusbar_timeout, statusbar);
return;
} }
void void
@ -1411,8 +1347,6 @@ Snes9xWindow::update_statusbar ()
gtk_window_set_title (GTK_WINDOW (window), title_string); gtk_window_set_title (GTK_WINDOW (window), title_string);
gtk_statusbar_pop (bar, gtk_statusbar_get_context_id (bar, "none")); gtk_statusbar_pop (bar, gtk_statusbar_get_context_id (bar, "none"));
gtk_statusbar_push (bar, gtk_statusbar_get_context_id (bar, "none"), status_string); gtk_statusbar_push (bar, gtk_statusbar_get_context_id (bar, "none"), status_string);
return;
} }
void void
@ -1473,8 +1407,6 @@ Snes9xWindow::show_rom_info ()
unpause_from_focus_change (); unpause_from_focus_change ();
gtk_widget_destroy (msg); gtk_widget_destroy (msg);
return;
} }
void void
@ -1552,8 +1484,6 @@ Snes9xWindow::configure_widgets ()
hide_mouse_cursor (); hide_mouse_cursor ();
else else
show_mouse_cursor (); show_mouse_cursor ();
return;
} }
void void
@ -1563,8 +1493,6 @@ Snes9xWindow::set_mouseable_area (int x, int y, int width, int height)
mouse_region_y = y; mouse_region_y = y;
mouse_region_width = width; mouse_region_width = width;
mouse_region_height = height; mouse_region_height = height;
return;
} }
void void
@ -1587,8 +1515,6 @@ Snes9xWindow::reset_screensaver ()
#endif #endif
config->screensaver_needs_reset = FALSE; config->screensaver_needs_reset = FALSE;
return;
} }
void void
@ -1774,8 +1700,6 @@ Snes9xWindow::enter_fullscreen_mode ()
config->ui_visible = FALSE; config->ui_visible = FALSE;
configure_widgets (); configure_widgets ();
return;
} }
void void
@ -1834,8 +1758,6 @@ Snes9xWindow::leave_fullscreen_mode ()
config->fullscreen = 0; config->fullscreen = 0;
configure_widgets (); configure_widgets ();
return;
} }
void void
@ -1863,8 +1785,6 @@ Snes9xWindow::toggle_statusbar ()
height += gtk_widget_get_visible (item) ? allocation.height : 0; height += gtk_widget_get_visible (item) ? allocation.height : 0;
resize (width, height); resize (width, height);
return;
} }
void void
@ -1883,8 +1803,6 @@ Snes9xWindow::resize_viewport (int width, int height)
y_padding += gtk_widget_get_visible (item) ? allocation.height : 0; y_padding += gtk_widget_get_visible (item) ? allocation.height : 0;
resize (width, height + y_padding); resize (width, height + y_padding);
return;
} }
void void
@ -1898,8 +1816,6 @@ Snes9xWindow::hide_mouse_cursor ()
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (drawing_area)), gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (drawing_area)),
empty_cursor); empty_cursor);
config->pointer_is_visible = FALSE; config->pointer_is_visible = FALSE;
return;
} }
void void
@ -1908,8 +1824,6 @@ Snes9xWindow::show_mouse_cursor ()
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (drawing_area)), gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (drawing_area)),
NULL); NULL);
config->pointer_is_visible = TRUE; config->pointer_is_visible = TRUE;
return;
} }
void void
@ -1943,8 +1857,6 @@ Snes9xWindow::show ()
gtk_widget_show (recent_menu); gtk_widget_show (recent_menu);
} }
return;
} }
void void
@ -1974,8 +1886,6 @@ Snes9xWindow::propagate_pause_state ()
configure_widgets (); configure_widgets ();
update_statusbar (); update_statusbar ();
} }
return;
} }
void void
@ -1984,8 +1894,6 @@ Snes9xWindow::toggle_ui ()
config->ui_visible = !config->ui_visible; config->ui_visible = !config->ui_visible;
configure_widgets (); configure_widgets ();
return;
} }
/* gui_[un]pause Handles when system needs to pause the emulator */ /* gui_[un]pause Handles when system needs to pause the emulator */
@ -1995,8 +1903,6 @@ Snes9xWindow::pause_from_focus_change ()
sys_pause += config->modal_dialogs; sys_pause += config->modal_dialogs;
propagate_pause_state (); propagate_pause_state ();
return;
} }
void void
@ -2005,8 +1911,6 @@ Snes9xWindow::unpause_from_focus_change ()
if (--sys_pause < 0) if (--sys_pause < 0)
sys_pause = 0; sys_pause = 0;
propagate_pause_state (); propagate_pause_state ();
return;
} }
/* client_[un]pause Handles when user manually chooses to pause */ /* client_[un]pause Handles when user manually chooses to pause */
@ -2015,8 +1919,6 @@ Snes9xWindow::pause_from_user ()
{ {
user_pause = TRUE; user_pause = TRUE;
propagate_pause_state (); propagate_pause_state ();
return;
} }
void void
@ -2024,8 +1926,6 @@ Snes9xWindow::unpause_from_user ()
{ {
user_pause = FALSE; user_pause = FALSE;
propagate_pause_state (); propagate_pause_state ();
return;
} }
unsigned char unsigned char
@ -2092,8 +1992,6 @@ Snes9xWindow::set_menu_item_accel_to_binding (const char *name,
bin.get_gdk_modifiers (), bin.get_gdk_modifiers (),
TRUE); TRUE);
} }
return;
} }
void void
@ -2134,8 +2032,6 @@ Snes9xWindow::update_accels ()
/* Special UI assignment */ /* Special UI assignment */
set_menu_item_accel_to_binding ("hide_ui", "Escape Key"); set_menu_item_accel_to_binding ("hide_ui", "Escape Key");
return;
} }
void void
@ -2145,8 +2041,6 @@ Snes9xWindow::resize_to_multiple (int factor)
int w = h * S9xGetAspect () + 0.5; int w = h * S9xGetAspect () + 0.5;
resize_viewport (w, h); resize_viewport (w, h);
return;
} }
cairo_t * cairo_t *

View File

@ -151,8 +151,6 @@ S9xPortSoundInit ()
{ {
S9xSetSoundMute (gui_config->mute_sound); S9xSetSoundMute (gui_config->mute_sound);
} }
return;
} }
void void
@ -174,24 +172,18 @@ S9xPortSoundDeinit ()
driver->terminate (); driver->terminate ();
delete driver; delete driver;
return;
} }
void void
S9xSoundStart () S9xSoundStart ()
{ {
driver->start (); driver->start ();
return;
} }
void void
S9xSoundStop () S9xSoundStop ()
{ {
driver->stop (); driver->stop ();
return;
} }
bool8 bool8
@ -217,6 +209,4 @@ S9xToggleSoundChannel (int c)
sound_switch ^= 1 << c; sound_switch ^= 1 << c;
S9xSetSoundControl (sound_switch); S9xSetSoundControl (sound_switch);
return;
} }

View File

@ -16,14 +16,11 @@ S9xAlsaSoundDriver::S9xAlsaSoundDriver ()
pcm = NULL; pcm = NULL;
sound_buffer = NULL; sound_buffer = NULL;
sound_buffer_size = 0; sound_buffer_size = 0;
return;
} }
void void
S9xAlsaSoundDriver::init () S9xAlsaSoundDriver::init ()
{ {
return;
} }
void void
@ -45,20 +42,16 @@ S9xAlsaSoundDriver::terminate ()
free (sound_buffer); free (sound_buffer);
sound_buffer = NULL; sound_buffer = NULL;
} }
return;
} }
void void
S9xAlsaSoundDriver::start () S9xAlsaSoundDriver::start ()
{ {
return;
} }
void void
S9xAlsaSoundDriver::stop () S9xAlsaSoundDriver::stop ()
{ {
return;
} }
bool8 bool8
@ -241,6 +234,4 @@ S9xAlsaSoundDriver::samples_available ()
frames_written += result; frames_written += result;
} }
} }
return;
} }

View File

@ -17,14 +17,11 @@ S9xOSSSoundDriver::S9xOSSSoundDriver ()
filedes = -1; filedes = -1;
sound_buffer = NULL; sound_buffer = NULL;
sound_buffer_size = 0; sound_buffer_size = 0;
return;
} }
void void
S9xOSSSoundDriver::init () S9xOSSSoundDriver::init ()
{ {
return;
} }
void void
@ -44,20 +41,16 @@ S9xOSSSoundDriver::terminate ()
free (sound_buffer); free (sound_buffer);
sound_buffer = NULL; sound_buffer = NULL;
} }
return;
} }
void void
S9xOSSSoundDriver::start () S9xOSSSoundDriver::start ()
{ {
return;
} }
void void
S9xOSSSoundDriver::stop () S9xOSSSoundDriver::stop ()
{ {
return;
} }
bool8 bool8
@ -227,6 +220,4 @@ S9xOSSSoundDriver::samples_available ()
bytes_written += result; bytes_written += result;
} }
return;
} }

View File

@ -11,8 +11,6 @@ static void
port_audio_samples_available_callback (void *data) port_audio_samples_available_callback (void *data)
{ {
((S9xPortAudioSoundDriver *) data)->samples_available (); ((S9xPortAudioSoundDriver *) data)->samples_available ();
return;
} }
S9xPortAudioSoundDriver::S9xPortAudioSoundDriver() S9xPortAudioSoundDriver::S9xPortAudioSoundDriver()
@ -20,8 +18,6 @@ S9xPortAudioSoundDriver::S9xPortAudioSoundDriver()
audio_stream = NULL; audio_stream = NULL;
sound_buffer = NULL; sound_buffer = NULL;
sound_buffer_size = 0; sound_buffer_size = 0;
return;
} }
void void
@ -35,8 +31,6 @@ S9xPortAudioSoundDriver::init ()
fprintf (stderr, fprintf (stderr,
"Couldn't initialize PortAudio: %s\n", "Couldn't initialize PortAudio: %s\n",
Pa_GetErrorText (err)); Pa_GetErrorText (err));
return;
} }
void void
@ -53,8 +47,6 @@ S9xPortAudioSoundDriver::terminate ()
free (sound_buffer); free (sound_buffer);
sound_buffer = NULL; sound_buffer = NULL;
} }
return;
} }
void void
@ -74,8 +66,6 @@ S9xPortAudioSoundDriver::start ()
fprintf (stderr, "Error: %s\n", Pa_GetErrorText (err)); fprintf (stderr, "Error: %s\n", Pa_GetErrorText (err));
} }
} }
return;
} }
void void
@ -85,8 +75,6 @@ S9xPortAudioSoundDriver::stop ()
{ {
Pa_StopStream (audio_stream); Pa_StopStream (audio_stream);
} }
return;
} }
bool8 bool8
@ -226,6 +214,4 @@ S9xPortAudioSoundDriver::samples_available ()
S9xMixSamples (sound_buffer, frames << (Settings.Stereo ? 1 : 0)); S9xMixSamples (sound_buffer, frames << (Settings.Stereo ? 1 : 0));
Pa_WriteStream (audio_stream, sound_buffer, frames); Pa_WriteStream (audio_stream, sound_buffer, frames);
return;
} }

View File

@ -17,14 +17,11 @@ S9xPulseSoundDriver::S9xPulseSoundDriver ()
context = NULL; context = NULL;
stream = NULL; stream = NULL;
buffer_size = 0; buffer_size = 0;
return;
} }
void void
S9xPulseSoundDriver::init () S9xPulseSoundDriver::init ()
{ {
return;
} }
void void
@ -51,44 +48,34 @@ S9xPulseSoundDriver::terminate ()
{ {
pa_threaded_mainloop_free (mainloop); pa_threaded_mainloop_free (mainloop);
} }
return;
} }
void void
S9xPulseSoundDriver::start () S9xPulseSoundDriver::start ()
{ {
return;
} }
void void
S9xPulseSoundDriver::stop () S9xPulseSoundDriver::stop ()
{ {
return;
} }
void void
S9xPulseSoundDriver::lock () S9xPulseSoundDriver::lock ()
{ {
pa_threaded_mainloop_lock (mainloop); pa_threaded_mainloop_lock (mainloop);
return;
} }
void void
S9xPulseSoundDriver::unlock () S9xPulseSoundDriver::unlock ()
{ {
pa_threaded_mainloop_unlock (mainloop); pa_threaded_mainloop_unlock (mainloop);
return;
} }
void void
S9xPulseSoundDriver::wait () S9xPulseSoundDriver::wait ()
{ {
pa_threaded_mainloop_wait (mainloop); pa_threaded_mainloop_wait (mainloop);
return;
} }
static void static void
@ -105,8 +92,6 @@ context_state_cb (pa_context *c, void *userdata)
{ {
pa_threaded_mainloop_signal (driver->mainloop, 0); pa_threaded_mainloop_signal (driver->mainloop, 0);
} }
return;
} }
static void static void
@ -123,8 +108,6 @@ stream_state_callback (pa_stream *p, void *userdata)
{ {
pa_threaded_mainloop_signal (driver->mainloop, 0); pa_threaded_mainloop_signal (driver->mainloop, 0);
} }
return;
} }
bool8 bool8
@ -285,6 +268,4 @@ S9xPulseSoundDriver::samples_available ()
pa_stream_write (stream, output_buffer, bytes, NULL, 0, PA_SEEK_RELATIVE); pa_stream_write (stream, output_buffer, bytes, NULL, 0, PA_SEEK_RELATIVE);
unlock (); unlock ();
return;
} }

View File

@ -5,8 +5,6 @@ static void
sdl_audio_callback (void *userdata, Uint8 *stream, int len) sdl_audio_callback (void *userdata, Uint8 *stream, int len)
{ {
((S9xSDLSoundDriver *) userdata)->mix ((unsigned char *) stream, len); ((S9xSDLSoundDriver *) userdata)->mix ((unsigned char *) stream, len);
return;
} }
static void static void
@ -15,8 +13,6 @@ samples_available (void *data)
SDL_LockAudio (); SDL_LockAudio ();
S9xFinalizeSamples (); S9xFinalizeSamples ();
SDL_UnlockAudio (); SDL_UnlockAudio ();
return;
} }
void void
@ -25,15 +21,11 @@ S9xSDLSoundDriver::mix (unsigned char *output, int bytes)
SDL_LockAudio (); SDL_LockAudio ();
S9xMixSamples (output, bytes >> (Settings.SixteenBitSound ? 1 : 0)); S9xMixSamples (output, bytes >> (Settings.SixteenBitSound ? 1 : 0));
SDL_UnlockAudio (); SDL_UnlockAudio ();
return;
} }
S9xSDLSoundDriver::S9xSDLSoundDriver () S9xSDLSoundDriver::S9xSDLSoundDriver ()
{ {
audiospec = NULL; audiospec = NULL;
return;
} }
void void
@ -41,8 +33,6 @@ S9xSDLSoundDriver::init ()
{ {
SDL_InitSubSystem (SDL_INIT_AUDIO); SDL_InitSubSystem (SDL_INIT_AUDIO);
stop (); stop ();
return;
} }
void void
@ -58,8 +48,6 @@ S9xSDLSoundDriver::terminate ()
} }
SDL_QuitSubSystem (SDL_INIT_AUDIO); SDL_QuitSubSystem (SDL_INIT_AUDIO);
return;
} }
void void
@ -72,8 +60,6 @@ S9xSDLSoundDriver::start ()
SDL_PauseAudio (0); SDL_PauseAudio (0);
} }
} }
return;
} }
void void
@ -83,8 +69,6 @@ S9xSDLSoundDriver::stop ()
{ {
SDL_PauseAudio (1); SDL_PauseAudio (1);
} }
return;
} }
bool8 bool8