From 90c2f8ebc6f48860b9b49d23c0cbb635fae28f4d Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 24 Jul 2009 01:11:41 +0000 Subject: [PATCH] Fixed up Linux after my previous changes. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1561 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Linux/ConfigDlg.cpp | 10 +++++----- pcsx2/Linux/HacksDlg.cpp | 2 +- pcsx2/Linux/LnxMain.cpp | 4 ++-- pcsx2/Linux/McdDlgs.cpp | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pcsx2/Linux/ConfigDlg.cpp b/pcsx2/Linux/ConfigDlg.cpp index 120eeea56..66773fb5c 100644 --- a/pcsx2/Linux/ConfigDlg.cpp +++ b/pcsx2/Linux/ConfigDlg.cpp @@ -58,7 +58,7 @@ static void ConfPlugin(plugin_types type, plugin_callback call, bool pullcombo = if (pullcombo) GetComboText(confs->Combo, confs->plist, plugin); if (plugin == NULL) return; - drv = SysLoadLibrary( Path::Combine( Config.PluginsDir, plugin ).c_str() ); + drv = SysLoadLibrary( Path::Combine( Config.Paths.Plugins, plugin ).c_str() ); if (drv == NULL) return; if (call != PLUGIN_TEST) @@ -229,7 +229,7 @@ void OnConfConf_PluginsPath(GtkButton *button, gpointer user_data) char reply[g_MaxPath]; GetDirectory(ConfDlg, "Choose the Plugin Directory:", reply); - strcpy(Config.PluginsDir, reply); + strcpy(Config.Paths.Plugins, reply); UpdateConfDlg(); } @@ -282,10 +282,10 @@ void FindPlugins() confs->PluginNameList = NULL; } - dir = opendir(Config.PluginsDir); + dir = opendir(Config.Paths.Plugins); if (dir == NULL) { - Msgbox::Alert("Could not open '%s' directory", params Config.PluginsDir); + Msgbox::Alert("Could not open '%s' directory", params Config.Paths.Plugins); return; } while ((ent = readdir(dir)) != NULL) @@ -293,7 +293,7 @@ void FindPlugins() u32 version; u32 type; - sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name); + sprintf(plugin, "%s%s", Config.Paths.Plugins, ent->d_name); if (strstr(plugin, ".so") == NULL) continue; Handle = SysLoadLibrary(plugin); diff --git a/pcsx2/Linux/HacksDlg.cpp b/pcsx2/Linux/HacksDlg.cpp index 88e36ebdc..98b6b2cdc 100644 --- a/pcsx2/Linux/HacksDlg.cpp +++ b/pcsx2/Linux/HacksDlg.cpp @@ -100,7 +100,7 @@ void on_Speed_Hacks(GtkMenuItem *menuitem, gpointer user_data) void on_Speed_Hack_OK(GtkButton *button, gpointer user_data) { - PcsxConfig::Hacks_t newhacks; + Hacks_t newhacks; newhacks.EECycleRate = 0; newhacks.IOPCycleDouble = is_checked(SpeedHacksDlg, "check_iop_cycle_rate"); diff --git a/pcsx2/Linux/LnxMain.cpp b/pcsx2/Linux/LnxMain.cpp index f8e0faf72..1c1a9d960 100644 --- a/pcsx2/Linux/LnxMain.cpp +++ b/pcsx2/Linux/LnxMain.cpp @@ -432,12 +432,12 @@ void pcsx2_exit() // with this the problem with plugins that are linked with the pthread // library is solved - dir = opendir(Config.PluginsDir); + dir = opendir(Config.Paths.Plugins); if (dir != NULL) { while ((ent = readdir(dir)) != NULL) { - sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name); + sprintf(plugin, "%s%s", Config.Paths.Plugins, ent->d_name); if (strstr(plugin, ".so") == NULL) continue; Handle = SysLoadLibrary(plugin); diff --git a/pcsx2/Linux/McdDlgs.cpp b/pcsx2/Linux/McdDlgs.cpp index 39454e1af..0968c0d01 100644 --- a/pcsx2/Linux/McdDlgs.cpp +++ b/pcsx2/Linux/McdDlgs.cpp @@ -38,7 +38,7 @@ void OnConf_Memcards(GtkMenuItem *menuitem, gpointer user_data) set_checked(MemDlg, "check_enable_mcd2", Config.Mcd[1].Enabled); set_checked(MemDlg, "check_eject_mcds", Config.McdEnableEject); - file = Path::GetCurrentDirectory();/* store current dir */ + file = Path::GetWorkingDirectory();/* store current dir */ sprintf(card, "%s/%s", file.c_str(), MEMCARDS_DIR ); Path::ChangeDirectory(string(card));/* change dirs so that plugins can find their config file*/ @@ -56,7 +56,7 @@ void OnConf_Memcards(GtkMenuItem *menuitem, gpointer user_data) { char path[g_MaxPath]; - sprintf(path, "%s/%s/%s", MAIN_DIR, MEMCARDS_DIR, entry->d_name); + sprintf(path, "%s/%s/%s", Config.Paths.Working, MEMCARDS_DIR, entry->d_name); for (j = 0; j < 2; j++) { @@ -83,17 +83,17 @@ void OnConf_Memcards(GtkMenuItem *menuitem, gpointer user_data) void OnMemcards_Ok(GtkButton *button, gpointer user_data) { if (gtk_combo_box_get_active(GTK_COMBO_BOX(lookup_widget(MemDlg, "memcard1combo"))) != -1) - sprintf(Config.Mcd[0].Filename, "%s/%s/%s", MAIN_DIR, MEMCARDS_DIR, + sprintf(Config.Mcd[0].Filename, "%s/%s/%s", Config.Paths.Working, MEMCARDS_DIR, gtk_combo_box_get_active_text(GTK_COMBO_BOX(lookup_widget(MemDlg, "memcard1combo")))); else - sprintf(Config.Mcd[0].Filename, "%s/%s/%s", MAIN_DIR, MEMCARDS_DIR, DEFAULT_MEMCARD1); + sprintf(Config.Mcd[0].Filename, "%s/%s/%s", Config.Paths.Working, MEMCARDS_DIR, DEFAULT_MEMCARD1); if (gtk_combo_box_get_active(GTK_COMBO_BOX(lookup_widget(MemDlg, "memcard2combo"))) != -1) - sprintf(Config.Mcd[1].Filename, "%s/%s/%s", MAIN_DIR, MEMCARDS_DIR, + sprintf(Config.Mcd[1].Filename, "%s/%s/%s", Config.Paths.Working, MEMCARDS_DIR, gtk_combo_box_get_active_text(GTK_COMBO_BOX(lookup_widget(MemDlg, "memcard2combo")))); else - sprintf(Config.Mcd[1].Filename, "%s/%s/%s", MAIN_DIR, MEMCARDS_DIR, DEFAULT_MEMCARD2); + sprintf(Config.Mcd[1].Filename, "%s/%s/%s", Config.Paths.Working, MEMCARDS_DIR, DEFAULT_MEMCARD2); Config.Mcd[0].Enabled = is_checked(MemDlg, "check_enable_mcd1"); Config.Mcd[1].Enabled = is_checked(MemDlg, "check_enable_mcd2");