diff options
| author | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-12-13 14:26:27 +0000 |
|---|---|---|
| committer | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-12-13 14:26:27 +0000 |
| commit | c0cba1977a8cac317af37c3004c53417fbce31bc (patch) | |
| tree | ecafa13566707a40f1aa26ac8933a4d2a57fcfe6 /gui | |
| parent | 7e7f6237488dc45f0aa52697cbd30484a5b5661d (diff) | |
| download | pcsxr-c0cba1977a8cac317af37c3004c53417fbce31bc.tar.gz | |
Patch 13442, 13443 (ckain);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81738 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'gui')
| -rwxr-xr-x | gui/Config.c | 2 | ||||
| -rwxr-xr-x | gui/DebugMemory.c | 34 | ||||
| -rw-r--r-- | gui/GtkGui.c | 14 |
3 files changed, 45 insertions, 5 deletions
diff --git a/gui/Config.c b/gui/Config.c index afbcf277..8c03a69c 100755 --- a/gui/Config.c +++ b/gui/Config.c @@ -121,6 +121,7 @@ int LoadConfig(PcsxConfig *Conf) { GetValue(data, "Mcd2", Config.Mcd2); GetValue(data, "BiosDir", Config.BiosDir); GetValue(data, "PluginsDir", Config.PluginsDir); + GetValue(data, "IsoImgDir", Config.IsoImgDir); Config.Xa = GetValueb(data, "Xa"); Config.Sio = GetValueb(data, "Sio"); @@ -163,6 +164,7 @@ void SaveConfig() { SetValue("Mcd2", Config.Mcd2); SetValue("BiosDir", Config.BiosDir); SetValue("PluginsDir", Config.PluginsDir); + SetValue("IsoImgDir", Config.IsoImgDir); SetValueb("Xa", Config.Xa); SetValueb("Sio", Config.Sio); diff --git a/gui/DebugMemory.c b/gui/DebugMemory.c index 27dcf8bd..61739978 100755 --- a/gui/DebugMemory.c +++ b/gui/DebugMemory.c @@ -26,6 +26,16 @@ static GtkBuilder *builder; static GtkWidget *MemViewDlg = NULL; static u32 MemViewAddress = 0; +/* Copy value of MemViewAddress as text of entry_address */ +static void sync_update_address_text() { + char buftext[20]; + GtkWidget *widget; + + sprintf(buftext, "%.8X", MemViewAddress | 0x80000000); + widget = gtk_builder_get_object(builder, "entry_address"); + gtk_entry_set_text(GTK_ENTRY(widget), buftext); +} + static void UpdateMemViewDlg() { s32 start, end; int i; @@ -42,9 +52,7 @@ static void UpdateMemViewDlg() { MemViewAddress &= 0x1fffff; - sprintf(buftext, "%.8X", MemViewAddress | 0x80000000); - widget = gtk_builder_get_object(builder, "entry_address"); - gtk_entry_set_text(GTK_ENTRY(widget), buftext); + sync_update_address_text(); start = MemViewAddress & 0x1ffff0; end = start + MEMVIEW_MAX_LINES * 16; @@ -81,6 +89,18 @@ static void UpdateMemViewDlg() { gtk_widget_show(widget); } +static void MemView_Prev() { + MemViewAddress -= MEMVIEW_MAX_LINES; + sync_update_address_text(); + UpdateMemViewDlg(); +} + +static void MemView_Next() { + MemViewAddress += MEMVIEW_MAX_LINES; + sync_update_address_text(); + UpdateMemViewDlg(); +} + static void MemView_Go() { GtkWidget *widget; @@ -311,6 +331,14 @@ void RunDebugMemoryDialog() { g_signal_connect_data(G_OBJECT(widget), "clicked", G_CALLBACK(MemView_Go), builder, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "btn_prev"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(MemView_Prev), builder, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "btn_next"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(MemView_Next), builder, NULL, G_CONNECT_AFTER); + g_signal_connect_data(G_OBJECT(MemViewDlg), "response", G_CALLBACK(MemView_Close), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); } diff --git a/gui/GtkGui.c b/gui/GtkGui.c index 15913b68..7b8b3734 100644 --- a/gui/GtkGui.c +++ b/gui/GtkGui.c @@ -593,8 +593,12 @@ static gchar *Open_Iso_Proc() { GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - if (current_folder[0] == '\0') { + if (current_folder[0] == '\0' && Config.IsoImgDir[0] != '\0') { + strcpy(current_folder, Config.IsoImgDir); + } else if (current_folder[0] == '\0' && Config.IsoImgDir[0] == '\0') { strcpy(current_folder, getenv("HOME")); + } else { + /* Using static (recent) PATH */ } gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (chooser), current_folder); @@ -636,7 +640,13 @@ static gchar *Open_Iso_Proc() { if(path == NULL) { strncpy(current_folder, filename, strrchr(filename, '/') - filename); } - + + /* If ISO path is NULL save current path. */ + if (Config.IsoImgDir[0] == '\0') { + strcpy(Config.IsoImgDir, current_folder); + SaveConfig(); + } + /* free useless data */ GSList * ll = l; while(l->next) { |
