Search
lxdream.org :: lxdream/src/gui/callbacks.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/callbacks.c
changeset 18:9a1b5d75703f
prev10:c898b37506e0
next19:9da7a8e38f9d
author nkeynes
date Thu Dec 15 13:33:14 2005 +0000 (14 years ago)
permissions -rw-r--r--
last change Implement save states
file annotate diff log raw
1.1 --- a/src/gui/callbacks.c Sun Dec 11 05:15:36 2005 +0000
1.2 +++ b/src/gui/callbacks.c Thu Dec 15 13:33:14 2005 +0000
1.3 @@ -9,6 +9,7 @@
1.4 #include "gui.h"
1.5 #include "sh4core.h"
1.6 #include "asic.h"
1.7 +#include "dreamcast.h"
1.8
1.9 int selected_pc = -1;
1.10
1.11 @@ -24,7 +25,7 @@
1.12 on_open1_activate (GtkMenuItem *menuitem,
1.13 gpointer user_data)
1.14 {
1.15 - open_file_dialog();
1.16 + open_file_dialog( "Open...", open_file, NULL, NULL );
1.17 }
1.18
1.19
1.20 @@ -73,7 +74,7 @@
1.21 on_load_btn_clicked (GtkButton *button,
1.22 gpointer user_data)
1.23 {
1.24 - open_file_dialog();
1.25 + open_file_dialog( "Open...", open_file, NULL, NULL );
1.26 }
1.27
1.28
1.29 @@ -218,7 +219,7 @@
1.30 on_mode_field_changed (GtkEditable *editable,
1.31 gpointer user_data)
1.32 {
1.33 - gchar *text = gtk_entry_get_text( GTK_ENTRY(editable) );
1.34 + const gchar *text = gtk_entry_get_text( GTK_ENTRY(editable) );
1.35 debug_info_t data = get_debug_info( GTK_WIDGET(editable) );
1.36 set_disassembly_cpu( data, text );
1.37 }
1.38 @@ -239,7 +240,7 @@
1.39 {
1.40 if( event->keyval == GDK_Return || event->keyval == GDK_Linefeed ) {
1.41 debug_info_t data = get_debug_info(widget);
1.42 - gchar *text = gtk_entry_get_text( GTK_ENTRY(widget) );
1.43 + const gchar *text = gtk_entry_get_text( GTK_ENTRY(widget) );
1.44 gchar *endptr;
1.45 unsigned int val = strtoul( text, &endptr, 16 );
1.46 if( text == endptr ) { /* invalid input */
1.47 @@ -313,3 +314,19 @@
1.48 dump_window_new();
1.49 }
1.50
1.51 +
1.52 +void
1.53 +on_loadstate_button_clicked (GtkToolButton *toolbutton,
1.54 + gpointer user_data)
1.55 +{
1.56 + open_file_dialog( "Load state...", dreamcast_load_state, "*.dst", "DreamOn Save State (*.dst)" );
1.57 +}
1.58 +
1.59 +
1.60 +void
1.61 +on_savestate_button_clicked (GtkToolButton *toolbutton,
1.62 + gpointer user_data)
1.63 +{
1.64 + save_file_dialog( "Save state...", dreamcast_save_state, "*.dst", "DreamOn Save State (*.dst)" );
1.65 +}
1.66 +
.