From d38e80ee04afe582e70150d3884e56c05f3fd7a8 Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 27 Nov 2004 21:44:44 +0000 Subject: Large dos2unix commit... --- PcsxSrc/Linux/Config.c | 254 ++-- PcsxSrc/Linux/GladeCalls.c | 1022 +++++++------- PcsxSrc/Linux/GladeCalls.h | 502 +++---- PcsxSrc/Linux/GladeFuncs.c | 324 ++--- PcsxSrc/Linux/GladeFuncs.h | 76 +- PcsxSrc/Linux/GladeGui.c | 3288 ++++++++++++++++++++++---------------------- PcsxSrc/Linux/GladeGui.h | 20 +- PcsxSrc/Linux/GtkGui.c | 2652 +++++++++++++++++------------------ PcsxSrc/Linux/Linux.h | 78 +- PcsxSrc/Linux/LnxMain.c | 392 +++--- PcsxSrc/Linux/Plugin.c | 416 +++--- PcsxSrc/Linux/Plugin.h | 76 +- 12 files changed, 4550 insertions(+), 4550 deletions(-) (limited to 'PcsxSrc/Linux') diff --git a/PcsxSrc/Linux/Config.c b/PcsxSrc/Linux/Config.c index ef526db..feecefa 100644 --- a/PcsxSrc/Linux/Config.c +++ b/PcsxSrc/Linux/Config.c @@ -1,127 +1,127 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include "Linux.h" - -#define GetValue(name, var) \ - tmp = strstr(data, name); \ - if (tmp != NULL) { \ - tmp+=strlen(name); \ - while ((*tmp == ' ') || (*tmp == '=')) tmp++; \ - if (*tmp != '\n') sscanf(tmp, "%s", var); \ - } - -#define GetValuel(name, var) \ - tmp = strstr(data, name); \ - if (tmp != NULL) { \ - tmp+=strlen(name); \ - while ((*tmp == ' ') || (*tmp == '=')) tmp++; \ - if (*tmp != '\n') sscanf(tmp, "%lx", &var); \ - } - -#define SetValue(name, var) \ - fprintf (f,"%s = %s\n", name, var); - -#define SetValuel(name, var) \ - fprintf (f,"%s = %lx\n", name, var); - -int LoadConfig(PcsxConfig *Conf) { - struct stat buf; - FILE *f; - int size; - char *data,*tmp; - - if (stat(cfgfile, &buf) == -1) return -1; - size = buf.st_size; - - f = fopen(cfgfile,"r"); - if (f == NULL) return -1; - - data = (char*)malloc(size); - if (data == NULL) return -1; - - fread(data, 1, size, f); - fclose(f); - - GetValue("Bios", Config.Bios); - GetValue("Gpu", Config.Gpu); - GetValue("Spu", Config.Spu); - GetValue("Cdr", Config.Cdr); - GetValue("Pad1", Config.Pad1); - GetValue("Pad2", Config.Pad2); - GetValue("Mcd1", Config.Mcd1); - GetValue("Mcd2", Config.Mcd2); - GetValue("PluginsDir", Config.PluginsDir); - GetValue("BiosDir", Config.BiosDir); - GetValuel("Xa", Config.Xa); - GetValuel("Sio", Config.Sio); - GetValuel("Mdec", Config.Mdec); - GetValuel("PsxAuto", Config.PsxAuto); - GetValuel("PsxType", Config.PsxType); - GetValuel("Cdda", Config.Cdda); - GetValuel("Cpu", Config.Cpu); - GetValuel("Log", Config.Log); - GetValuel("PsxOut", Config.PsxOut); - GetValuel("SpuIrq", Config.SpuIrq); - GetValuel("CdTiming",Config.CdTiming); - - free(data); - - return 0; -} - -///////////////////////////////////////////////////////// - -void SaveConfig() { - FILE *f; - - f = fopen(cfgfile,"w"); - if (f == NULL) return; - - SetValue("Bios", Config.Bios); - SetValue("Gpu", Config.Gpu); - SetValue("Spu", Config.Spu); - SetValue("Cdr", Config.Cdr); - SetValue("Pad1", Config.Pad1); - SetValue("Pad2", Config.Pad2); - SetValue("Mcd1", Config.Mcd1); - SetValue("Mcd2", Config.Mcd2); - SetValue("PluginsDir", Config.PluginsDir); - SetValue("BiosDir", Config.BiosDir); - SetValuel("Xa", Config.Xa); - SetValuel("Sio", Config.Sio); - SetValuel("Mdec", Config.Mdec); - SetValuel("PsxAuto", Config.PsxAuto); - SetValuel("PsxType", Config.PsxType); - SetValuel("Cdda", Config.Cdda); - SetValuel("Cpu", Config.Cpu); - SetValuel("Log", Config.Log); - SetValuel("PsxOut", Config.PsxOut); - SetValuel("SpuIrq", Config.SpuIrq); - SetValuel("CdTiming",Config.CdTiming); - - fclose(f); - - return; -} +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +#include "Linux.h" + +#define GetValue(name, var) \ + tmp = strstr(data, name); \ + if (tmp != NULL) { \ + tmp+=strlen(name); \ + while ((*tmp == ' ') || (*tmp == '=')) tmp++; \ + if (*tmp != '\n') sscanf(tmp, "%s", var); \ + } + +#define GetValuel(name, var) \ + tmp = strstr(data, name); \ + if (tmp != NULL) { \ + tmp+=strlen(name); \ + while ((*tmp == ' ') || (*tmp == '=')) tmp++; \ + if (*tmp != '\n') sscanf(tmp, "%lx", &var); \ + } + +#define SetValue(name, var) \ + fprintf (f,"%s = %s\n", name, var); + +#define SetValuel(name, var) \ + fprintf (f,"%s = %lx\n", name, var); + +int LoadConfig(PcsxConfig *Conf) { + struct stat buf; + FILE *f; + int size; + char *data,*tmp; + + if (stat(cfgfile, &buf) == -1) return -1; + size = buf.st_size; + + f = fopen(cfgfile,"r"); + if (f == NULL) return -1; + + data = (char*)malloc(size); + if (data == NULL) return -1; + + fread(data, 1, size, f); + fclose(f); + + GetValue("Bios", Config.Bios); + GetValue("Gpu", Config.Gpu); + GetValue("Spu", Config.Spu); + GetValue("Cdr", Config.Cdr); + GetValue("Pad1", Config.Pad1); + GetValue("Pad2", Config.Pad2); + GetValue("Mcd1", Config.Mcd1); + GetValue("Mcd2", Config.Mcd2); + GetValue("PluginsDir", Config.PluginsDir); + GetValue("BiosDir", Config.BiosDir); + GetValuel("Xa", Config.Xa); + GetValuel("Sio", Config.Sio); + GetValuel("Mdec", Config.Mdec); + GetValuel("PsxAuto", Config.PsxAuto); + GetValuel("PsxType", Config.PsxType); + GetValuel("Cdda", Config.Cdda); + GetValuel("Cpu", Config.Cpu); + GetValuel("Log", Config.Log); + GetValuel("PsxOut", Config.PsxOut); + GetValuel("SpuIrq", Config.SpuIrq); + GetValuel("CdTiming",Config.CdTiming); + + free(data); + + return 0; +} + +///////////////////////////////////////////////////////// + +void SaveConfig() { + FILE *f; + + f = fopen(cfgfile,"w"); + if (f == NULL) return; + + SetValue("Bios", Config.Bios); + SetValue("Gpu", Config.Gpu); + SetValue("Spu", Config.Spu); + SetValue("Cdr", Config.Cdr); + SetValue("Pad1", Config.Pad1); + SetValue("Pad2", Config.Pad2); + SetValue("Mcd1", Config.Mcd1); + SetValue("Mcd2", Config.Mcd2); + SetValue("PluginsDir", Config.PluginsDir); + SetValue("BiosDir", Config.BiosDir); + SetValuel("Xa", Config.Xa); + SetValuel("Sio", Config.Sio); + SetValuel("Mdec", Config.Mdec); + SetValuel("PsxAuto", Config.PsxAuto); + SetValuel("PsxType", Config.PsxType); + SetValuel("Cdda", Config.Cdda); + SetValuel("Cpu", Config.Cpu); + SetValuel("Log", Config.Log); + SetValuel("PsxOut", Config.PsxOut); + SetValuel("SpuIrq", Config.SpuIrq); + SetValuel("CdTiming",Config.CdTiming); + + fclose(f); + + return; +} diff --git a/PcsxSrc/Linux/GladeCalls.c b/PcsxSrc/Linux/GladeCalls.c index 938a8e3..2db68be 100644 --- a/PcsxSrc/Linux/GladeCalls.c +++ b/PcsxSrc/Linux/GladeCalls.c @@ -1,511 +1,511 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include "GladeCalls.h" -#include "GladeGui.h" -#include "GladeFuncs.h" - - -void -OnDestroy (GtkObject *object, - gpointer user_data) -{ - -} - - -void -OnFile_RunCd (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnFile_RunCdBios (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnFile_RunExe (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnFile_Exit (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnEmu_Run (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnEmu_Reset (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Conf (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Gpu (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Spu (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Cdr (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Pads (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Cpu (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnConf_Mcds (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnHelp_About (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnHelpAbout_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_CdrConf (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_CdrTest (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_CdrAbout (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad2Conf (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad2Test (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad2About (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad1Conf (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad1Test (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Pad1About (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_GpuConf (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_GpuTest (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_GpuAbout (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_SpuConf (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_SpuTest (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_SpuAbout (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_PluginsPath (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_BiosPath (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnConfConf_Cancel (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnCpu_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnCpu_Cancel (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_FS1 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Format1 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Reload1 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_FS2 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Format2 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Reload2 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Cancel (GtkButton *button, - gpointer user_data) -{ - -} - - -gboolean -OnList1_KeyPress (GtkWidget *widget, - GdkEventKey *event, - gpointer user_data) -{ - - return FALSE; -} - - -gboolean -OnList2_KeyPress (GtkWidget *widget, - GdkEventKey *event, - gpointer user_data) -{ - - return FALSE; -} - - -void -OnMcd_Copy (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Paste (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Delete (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_CopyTo2 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_CopyTo1 (GtkButton *button, - gpointer user_data) -{ - -} - - -GtkDirectionType -OnList1_Focus (GtkContainer *container, - GtkDirectionType direction, - gpointer user_data) -{ - -} - - -void -OnList1_SelectRow (GtkCList *clist, - gint row, - gint column, - GdkEvent *event, - gpointer user_data) -{ - -} - - -void -OnList2_SelectRow (GtkCList *clist, - gint row, - gint column, - GdkEvent *event, - gpointer user_data) -{ - -} - - -void -OnMcd_Delete2 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnMcd_Delete1 (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnDebug (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - - -void -OnDbg_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -void -OnDebug_Ok (GtkButton *button, - gpointer user_data) -{ - -} - - -gboolean -OnConfConf_Cancel (GtkWidget *widget, - GdkEvent *event, - gpointer user_data) -{ - - return FALSE; -} - +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "GladeCalls.h" +#include "GladeGui.h" +#include "GladeFuncs.h" + + +void +OnDestroy (GtkObject *object, + gpointer user_data) +{ + +} + + +void +OnFile_RunCd (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnFile_RunCdBios (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnFile_RunExe (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnFile_Exit (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnEmu_Run (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnEmu_Reset (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Conf (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Gpu (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Spu (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Cdr (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Pads (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Cpu (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnConf_Mcds (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnHelp_About (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnHelpAbout_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_CdrConf (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_CdrTest (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_CdrAbout (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad2Conf (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad2Test (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad2About (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad1Conf (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad1Test (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Pad1About (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_GpuConf (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_GpuTest (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_GpuAbout (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_SpuConf (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_SpuTest (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_SpuAbout (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_PluginsPath (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_BiosPath (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnConfConf_Cancel (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnCpu_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnCpu_Cancel (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_FS1 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Format1 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Reload1 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_FS2 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Format2 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Reload2 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Cancel (GtkButton *button, + gpointer user_data) +{ + +} + + +gboolean +OnList1_KeyPress (GtkWidget *widget, + GdkEventKey *event, + gpointer user_data) +{ + + return FALSE; +} + + +gboolean +OnList2_KeyPress (GtkWidget *widget, + GdkEventKey *event, + gpointer user_data) +{ + + return FALSE; +} + + +void +OnMcd_Copy (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Paste (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Delete (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_CopyTo2 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_CopyTo1 (GtkButton *button, + gpointer user_data) +{ + +} + + +GtkDirectionType +OnList1_Focus (GtkContainer *container, + GtkDirectionType direction, + gpointer user_data) +{ + +} + + +void +OnList1_SelectRow (GtkCList *clist, + gint row, + gint column, + GdkEvent *event, + gpointer user_data) +{ + +} + + +void +OnList2_SelectRow (GtkCList *clist, + gint row, + gint column, + GdkEvent *event, + gpointer user_data) +{ + +} + + +void +OnMcd_Delete2 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnMcd_Delete1 (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnDebug (GtkMenuItem *menuitem, + gpointer user_data) +{ + +} + + +void +OnDbg_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +void +OnDebug_Ok (GtkButton *button, + gpointer user_data) +{ + +} + + +gboolean +OnConfConf_Cancel (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + + return FALSE; +} + diff --git a/PcsxSrc/Linux/GladeCalls.h b/PcsxSrc/Linux/GladeCalls.h index 0eb216d..1b718b7 100644 --- a/PcsxSrc/Linux/GladeCalls.h +++ b/PcsxSrc/Linux/GladeCalls.h @@ -1,251 +1,251 @@ -#include - - -void -OnDestroy (GtkObject *object, - gpointer user_data); - -void -OnFile_RunCd (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnFile_RunCdBios (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnFile_RunExe (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnFile_Exit (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnEmu_Run (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnEmu_Reset (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Conf (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Gpu (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Spu (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Cdr (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Pads (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Cpu (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnConf_Mcds (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnHelp_About (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnHelpAbout_Ok (GtkButton *button, - gpointer user_data); - -void -OnConfConf_CdrConf (GtkButton *button, - gpointer user_data); - -void -OnConfConf_CdrTest (GtkButton *button, - gpointer user_data); - -void -OnConfConf_CdrAbout (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad2Conf (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad2Test (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad2About (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad1Conf (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad1Test (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Pad1About (GtkButton *button, - gpointer user_data); - -void -OnConfConf_GpuConf (GtkButton *button, - gpointer user_data); - -void -OnConfConf_GpuTest (GtkButton *button, - gpointer user_data); - -void -OnConfConf_GpuAbout (GtkButton *button, - gpointer user_data); - -void -OnConfConf_SpuConf (GtkButton *button, - gpointer user_data); - -void -OnConfConf_SpuTest (GtkButton *button, - gpointer user_data); - -void -OnConfConf_SpuAbout (GtkButton *button, - gpointer user_data); - -void -OnConfConf_PluginsPath (GtkButton *button, - gpointer user_data); - -void -OnConfConf_BiosPath (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Ok (GtkButton *button, - gpointer user_data); - -void -OnConfConf_Cancel (GtkButton *button, - gpointer user_data); - -void -OnCpu_Ok (GtkButton *button, - gpointer user_data); - -void -OnCpu_Cancel (GtkButton *button, - gpointer user_data); - -void -OnMcd_FS1 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Format1 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Reload1 (GtkButton *button, - gpointer user_data); - -void -OnMcd_FS2 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Format2 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Reload2 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Ok (GtkButton *button, - gpointer user_data); - -void -OnMcd_Cancel (GtkButton *button, - gpointer user_data); - -gboolean -OnList1_KeyPress (GtkWidget *widget, - GdkEventKey *event, - gpointer user_data); - -gboolean -OnList2_KeyPress (GtkWidget *widget, - GdkEventKey *event, - gpointer user_data); - -void -OnMcd_Copy (GtkButton *button, - gpointer user_data); - -void -OnMcd_Paste (GtkButton *button, - gpointer user_data); - -void -OnMcd_Delete (GtkButton *button, - gpointer user_data); - -void -OnMcd_CopyTo2 (GtkButton *button, - gpointer user_data); - -void -OnMcd_CopyTo1 (GtkButton *button, - gpointer user_data); - -GtkDirectionType -OnList1_Focus (GtkContainer *container, - GtkDirectionType direction, - gpointer user_data); - -void -OnList1_SelectRow (GtkCList *clist, - gint row, - gint column, - GdkEvent *event, - gpointer user_data); - -void -OnList2_SelectRow (GtkCList *clist, - gint row, - gint column, - GdkEvent *event, - gpointer user_data); - -void -OnMcd_Delete2 (GtkButton *button, - gpointer user_data); - -void -OnMcd_Delete1 (GtkButton *button, - gpointer user_data); - -void -OnDebug (GtkMenuItem *menuitem, - gpointer user_data); - -void -OnDbg_Ok (GtkButton *button, - gpointer user_data); - -void -OnDebug_Ok (GtkButton *button, - gpointer user_data); +#include + + +void +OnDestroy (GtkObject *object, + gpointer user_data); + +void +OnFile_RunCd (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnFile_RunCdBios (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnFile_RunExe (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnFile_Exit (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnEmu_Run (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnEmu_Reset (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Conf (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Gpu (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Spu (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Cdr (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Pads (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Cpu (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnConf_Mcds (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnHelp_About (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnHelpAbout_Ok (GtkButton *button, + gpointer user_data); + +void +OnConfConf_CdrConf (GtkButton *button, + gpointer user_data); + +void +OnConfConf_CdrTest (GtkButton *button, + gpointer user_data); + +void +OnConfConf_CdrAbout (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad2Conf (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad2Test (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad2About (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad1Conf (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad1Test (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Pad1About (GtkButton *button, + gpointer user_data); + +void +OnConfConf_GpuConf (GtkButton *button, + gpointer user_data); + +void +OnConfConf_GpuTest (GtkButton *button, + gpointer user_data); + +void +OnConfConf_GpuAbout (GtkButton *button, + gpointer user_data); + +void +OnConfConf_SpuConf (GtkButton *button, + gpointer user_data); + +void +OnConfConf_SpuTest (GtkButton *button, + gpointer user_data); + +void +OnConfConf_SpuAbout (GtkButton *button, + gpointer user_data); + +void +OnConfConf_PluginsPath (GtkButton *button, + gpointer user_data); + +void +OnConfConf_BiosPath (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Ok (GtkButton *button, + gpointer user_data); + +void +OnConfConf_Cancel (GtkButton *button, + gpointer user_data); + +void +OnCpu_Ok (GtkButton *button, + gpointer user_data); + +void +OnCpu_Cancel (GtkButton *button, + gpointer user_data); + +void +OnMcd_FS1 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Format1 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Reload1 (GtkButton *button, + gpointer user_data); + +void +OnMcd_FS2 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Format2 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Reload2 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Ok (GtkButton *button, + gpointer user_data); + +void +OnMcd_Cancel (GtkButton *button, + gpointer user_data); + +gboolean +OnList1_KeyPress (GtkWidget *widget, + GdkEventKey *event, + gpointer user_data); + +gboolean +OnList2_KeyPress (GtkWidget *widget, + GdkEventKey *event, + gpointer user_data); + +void +OnMcd_Copy (GtkButton *button, + gpointer user_data); + +void +OnMcd_Paste (GtkButton *button, + gpointer user_data); + +void +OnMcd_Delete (GtkButton *button, + gpointer user_data); + +void +OnMcd_CopyTo2 (GtkButton *button, + gpointer user_data); + +void +OnMcd_CopyTo1 (GtkButton *button, + gpointer user_data); + +GtkDirectionType +OnList1_Focus (GtkContainer *container, + GtkDirectionType direction, + gpointer user_data); + +void +OnList1_SelectRow (GtkCList *clist, + gint row, + gint column, + GdkEvent *event, + gpointer user_data); + +void +OnList2_SelectRow (GtkCList *clist, + gint row, + gint column, + GdkEvent *event, + gpointer user_data); + +void +OnMcd_Delete2 (GtkButton *button, + gpointer user_data); + +void +OnMcd_Delete1 (GtkButton *button, + gpointer user_data); + +void +OnDebug (GtkMenuItem *menuitem, + gpointer user_data); + +void +OnDbg_Ok (GtkButton *button, + gpointer user_data); + +void +OnDebug_Ok (GtkButton *button, + gpointer user_data); diff --git a/PcsxSrc/Linux/GladeFuncs.c b/PcsxSrc/Linux/GladeFuncs.c index 47dbfc3..f20a9a2 100644 --- a/PcsxSrc/Linux/GladeFuncs.c +++ b/PcsxSrc/Linux/GladeFuncs.c @@ -1,162 +1,162 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include - -#include "GladeFuncs.h" - -/* This is an internally used function to check if a pixmap file exists. */ -static gchar* check_file_exists (const gchar *directory, - const gchar *filename); - -/* This is an internally used function to create pixmaps. */ -static GtkWidget* create_dummy_pixmap (GtkWidget *widget); - -GtkWidget* -lookup_widget (GtkWidget *widget, - const gchar *widget_name) -{ - GtkWidget *parent, *found_widget; - - for (;;) - { - if (GTK_IS_MENU (widget)) - parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); - else - parent = widget->parent; - if (parent == NULL) - break; - widget = parent; - } - - found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), - widget_name); - if (!found_widget) - g_warning ("Widget not found: %s", widget_name); - return found_widget; -} - -/* This is a dummy pixmap we use when a pixmap can't be found. */ -static char *dummy_pixmap_xpm[] = { -/* columns rows colors chars-per-pixel */ -"1 1 1 1", -" c None", -/* pixels */ -" " -}; - -/* This is an internally used function to create pixmaps. */ -static GtkWidget* -create_dummy_pixmap (GtkWidget *widget) -{ - GdkColormap *colormap; - GdkPixmap *gdkpixmap; - GdkBitmap *mask; - GtkWidget *pixmap; - - colormap = gtk_widget_get_colormap (widget); - gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, - NULL, dummy_pixmap_xpm); - if (gdkpixmap == NULL) - g_error ("Couldn't create replacement pixmap."); - pixmap = gtk_pixmap_new (gdkpixmap, mask); - gdk_pixmap_unref (gdkpixmap); - gdk_bitmap_unref (mask); - return pixmap; -} - -static GList *pixmaps_directories = NULL; - -/* Use this function to set the directory containing installed pixmaps. */ -void -add_pixmap_directory (const gchar *directory) -{ - pixmaps_directories = g_list_prepend (pixmaps_directories, - g_strdup (directory)); -} - -/* This is an internally used function to create pixmaps. */ -GtkWidget* -create_pixmap (GtkWidget *widget, - const gchar *filename) -{ - gchar *found_filename = NULL; - GdkColormap *colormap; - GdkPixmap *gdkpixmap; - GdkBitmap *mask; - GtkWidget *pixmap; - GList *elem; - - if (!filename || !filename[0]) - return create_dummy_pixmap (widget); - - /* We first try any pixmaps directories set by the application. */ - elem = pixmaps_directories; - while (elem) - { - found_filename = check_file_exists ((gchar*)elem->data, filename); - if (found_filename) - break; - elem = elem->next; - } - - /* If we haven't found the pixmap, try the source directory. */ - if (!found_filename) - { - found_filename = check_file_exists (".pixmaps", filename); - } - - if (!found_filename) - { - g_warning ("Couldn't find pixmap file: %s", filename); - return create_dummy_pixmap (widget); - } - - colormap = gtk_widget_get_colormap (widget); - gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, - NULL, found_filename); - if (gdkpixmap == NULL) - { - g_warning ("Error loading pixmap file: %s", found_filename); - g_free (found_filename); - return create_dummy_pixmap (widget); - } - g_free (found_filename); - pixmap = gtk_pixmap_new (gdkpixmap, mask); - gdk_pixmap_unref (gdkpixmap); - gdk_bitmap_unref (mask); - return pixmap; -} - -/* This is an internally used function to check if a pixmap file exists. */ -gchar* -check_file_exists (const gchar *directory, - const gchar *filename) -{ - gchar *full_filename; - struct stat s; - gint status; - - full_filename = (gchar*) g_malloc (strlen (directory) + 1 - + strlen (filename) + 1); - strcpy (full_filename, directory); - strcat (full_filename, G_DIR_SEPARATOR_S); - strcat (full_filename, filename); - - status = stat (full_filename, &s); - if (status == 0 && S_ISREG (s.st_mode)) - return full_filename; - g_free (full_filename); - return NULL; -} - +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include + +#include "GladeFuncs.h" + +/* This is an internally used function to check if a pixmap file exists. */ +static gchar* check_file_exists (const gchar *directory, + const gchar *filename); + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* create_dummy_pixmap (GtkWidget *widget); + +GtkWidget* +lookup_widget (GtkWidget *widget, + const gchar *widget_name) +{ + GtkWidget *parent, *found_widget; + + for (;;) + { + if (GTK_IS_MENU (widget)) + parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else + parent = widget->parent; + if (parent == NULL) + break; + widget = parent; + } + + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +/* This is a dummy pixmap we use when a pixmap can't be found. */ +static char *dummy_pixmap_xpm[] = { +/* columns rows colors chars-per-pixel */ +"1 1 1 1", +" c None", +/* pixels */ +" " +}; + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* +create_dummy_pixmap (GtkWidget *widget) +{ + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, + NULL, dummy_pixmap_xpm); + if (gdkpixmap == NULL) + g_error ("Couldn't create replacement pixmap."); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +static GList *pixmaps_directories = NULL; + +/* Use this function to set the directory containing installed pixmaps. */ +void +add_pixmap_directory (const gchar *directory) +{ + pixmaps_directories = g_list_prepend (pixmaps_directories, + g_strdup (directory)); +} + +/* This is an internally used function to create pixmaps. */ +GtkWidget* +create_pixmap (GtkWidget *widget, + const gchar *filename) +{ + gchar *found_filename = NULL; + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + GList *elem; + + if (!filename || !filename[0]) + return create_dummy_pixmap (widget); + + /* We first try any pixmaps directories set by the application. */ + elem = pixmaps_directories; + while (elem) + { + found_filename = check_file_exists ((gchar*)elem->data, filename); + if (found_filename) + break; + elem = elem->next; + } + + /* If we haven't found the pixmap, try the source directory. */ + if (!found_filename) + { + found_filename = check_file_exists (".pixmaps", filename); + } + + if (!found_filename) + { + g_warning ("Couldn't find pixmap file: %s", filename); + return create_dummy_pixmap (widget); + } + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, + NULL, found_filename); + if (gdkpixmap == NULL) + { + g_warning ("Error loading pixmap file: %s", found_filename); + g_free (found_filename); + return create_dummy_pixmap (widget); + } + g_free (found_filename); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +/* This is an internally used function to check if a pixmap file exists. */ +gchar* +check_file_exists (const gchar *directory, + const gchar *filename) +{ + gchar *full_filename; + struct stat s; + gint status; + + full_filename = (gchar*) g_malloc (strlen (directory) + 1 + + strlen (filename) + 1); + strcpy (full_filename, directory); + strcat (full_filename, G_DIR_SEPARATOR_S); + strcat (full_filename, filename); + + status = stat (full_filename, &s); + if (status == 0 && S_ISREG (s.st_mode)) + return full_filename; + g_free (full_filename); + return NULL; +} + diff --git a/PcsxSrc/Linux/GladeFuncs.h b/PcsxSrc/Linux/GladeFuncs.h index 8866159..aee31f9 100644 --- a/PcsxSrc/Linux/GladeFuncs.h +++ b/PcsxSrc/Linux/GladeFuncs.h @@ -1,38 +1,38 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -/* - * Public Functions. - */ - -/* - * This function returns a widget in a component created by Glade. - * Call it with the toplevel widget in the component (i.e. a window/dialog), - * or alternatively any widget in the component, and the name of the widget - * you want returned. - */ -GtkWidget* lookup_widget (GtkWidget *widget, - const gchar *widget_name); - -/* get_widget() is deprecated. Use lookup_widget instead. */ -#define get_widget lookup_widget - -/* Use this function to set the directory containing installed pixmaps. */ -void add_pixmap_directory (const gchar *directory); - - -/* - * Private Functions. - */ - -/* This is used to create the pixmaps in the interface. */ -GtkWidget* create_pixmap (GtkWidget *widget, - const gchar *filename); - +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +/* + * Public Functions. + */ + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* lookup_widget (GtkWidget *widget, + const gchar *widget_name); + +/* get_widget() is deprecated. Use lookup_widget instead. */ +#define get_widget lookup_widget + +/* Use this function to set the directory containing installed pixmaps. */ +void add_pixmap_directory (const gchar *directory); + + +/* + * Private Functions. + */ + +/* This is used to create the pixmaps in the interface. */ +GtkWidget* create_pixmap (GtkWidget *widget, + const gchar *filename); + diff --git a/PcsxSrc/Linux/GladeGui.c b/PcsxSrc/Linux/GladeGui.c index 44ec6c8..0af25dc 100644 --- a/PcsxSrc/Linux/GladeGui.c +++ b/PcsxSrc/Linux/GladeGui.c @@ -1,1644 +1,1644 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include -#include - -#include "GladeCalls.h" -#include "GladeGui.h" -#include "GladeFuncs.h" - -GtkWidget* -create_MainWindow (void) -{ - GtkWidget *MainWindow; - GtkWidget *vbox1; - GtkWidget *menubar1; - GtkWidget *item1; - GtkWidget *item1_menu; - GtkAccelGroup *item1_menu_accels; - GtkWidget *RunCd; - GtkWidget *RunCdBiois; - GtkWidget *Run_Exe; - GtkWidget *separator2; - GtkWidget *exit2; - GtkWidget *emulator1; - GtkWidget *emulator1_menu; - GtkAccelGroup *emulator1_menu_accels; - GtkWidget *run1; - GtkWidget *reset1; - GtkWidget *configuration1; - GtkWidget *configuration1_menu; - GtkAccelGroup *configuration1_menu_accels; - GtkWidget *plugins___bios1; - GtkWidget *separator3; - GtkWidget *graphics1; - GtkWidget *sound1; - GtkWidget *cd_rom1; - GtkWidget *controllers1; - GtkWidget *separator4; - GtkWidget *cpu1; - GtkWidget *memory_cards1; - GtkWidget *debug1; - GtkWidget *help1; - GtkWidget *help1_menu; - GtkAccelGroup *help1_menu_accels; - GtkWidget *about_pcsx1; - - MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_object_set_data (GTK_OBJECT (MainWindow), "MainWindow", MainWindow); - gtk_widget_set_usize (MainWindow, 350, 200); - gtk_window_set_title (GTK_WINDOW (MainWindow), "PCSX"); - gtk_window_set_position (GTK_WINDOW (MainWindow), GTK_WIN_POS_CENTER); - gtk_window_set_policy (GTK_WINDOW (MainWindow), FALSE, FALSE, FALSE); - - vbox1 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "vbox1", vbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox1); - gtk_container_add (GTK_CONTAINER (MainWindow), vbox1); - - menubar1 = gtk_menu_bar_new (); - gtk_widget_ref (menubar1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "menubar1", menubar1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (menubar1); - gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0); - - item1 = gtk_menu_item_new_with_label ("File"); - gtk_widget_ref (item1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "item1", item1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (item1); - gtk_container_add (GTK_CONTAINER (menubar1), item1); - - item1_menu = gtk_menu_new (); - gtk_widget_ref (item1_menu); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "item1_menu", item1_menu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (item1), item1_menu); - item1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (item1_menu)); - - RunCd = gtk_menu_item_new_with_label ("Run Cd"); - gtk_widget_ref (RunCd); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "RunCd", RunCd, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (RunCd); - gtk_container_add (GTK_CONTAINER (item1_menu), RunCd); - - RunCdBiois = gtk_menu_item_new_with_label ("Run Cd Through Bios"); - gtk_widget_ref (RunCdBiois); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "RunCdBiois", RunCdBiois, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (RunCdBiois); - gtk_container_add (GTK_CONTAINER (item1_menu), RunCdBiois); - - Run_Exe = gtk_menu_item_new_with_label ("Run Exe"); - gtk_widget_ref (Run_Exe); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "Run_Exe", Run_Exe, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (Run_Exe); - gtk_container_add (GTK_CONTAINER (item1_menu), Run_Exe); - - separator2 = gtk_menu_item_new (); - gtk_widget_ref (separator2); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator2", separator2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (separator2); - gtk_container_add (GTK_CONTAINER (item1_menu), separator2); - gtk_widget_set_sensitive (separator2, FALSE); - - exit2 = gtk_menu_item_new_with_label ("Exit"); - gtk_widget_ref (exit2); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "exit2", exit2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (exit2); - gtk_container_add (GTK_CONTAINER (item1_menu), exit2); - - emulator1 = gtk_menu_item_new_with_label ("Emulator"); - gtk_widget_ref (emulator1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "emulator1", emulator1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (emulator1); - gtk_container_add (GTK_CONTAINER (menubar1), emulator1); - - emulator1_menu = gtk_menu_new (); - gtk_widget_ref (emulator1_menu); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "emulator1_menu", emulator1_menu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (emulator1), emulator1_menu); - emulator1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (emulator1_menu)); - - run1 = gtk_menu_item_new_with_label ("Run"); - gtk_widget_ref (run1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "run1", run1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (run1); - gtk_container_add (GTK_CONTAINER (emulator1_menu), run1); - - reset1 = gtk_menu_item_new_with_label ("Reset"); - gtk_widget_ref (reset1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "reset1", reset1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (reset1); - gtk_container_add (GTK_CONTAINER (emulator1_menu), reset1); - - configuration1 = gtk_menu_item_new_with_label ("Configuration"); - gtk_widget_ref (configuration1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "configuration1", configuration1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (configuration1); - gtk_container_add (GTK_CONTAINER (menubar1), configuration1); - - configuration1_menu = gtk_menu_new (); - gtk_widget_ref (configuration1_menu); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "configuration1_menu", configuration1_menu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (configuration1), configuration1_menu); - configuration1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (configuration1_menu)); - - plugins___bios1 = gtk_menu_item_new_with_label ("Plugins & Bios"); - gtk_widget_ref (plugins___bios1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "plugins___bios1", plugins___bios1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (plugins___bios1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), plugins___bios1); - - separator3 = gtk_menu_item_new (); - gtk_widget_ref (separator3); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator3", separator3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (separator3); - gtk_container_add (GTK_CONTAINER (configuration1_menu), separator3); - gtk_widget_set_sensitive (separator3, FALSE); - - graphics1 = gtk_menu_item_new_with_label ("Graphics"); - gtk_widget_ref (graphics1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "graphics1", graphics1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (graphics1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), graphics1); - - sound1 = gtk_menu_item_new_with_label ("Sound"); - gtk_widget_ref (sound1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "sound1", sound1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (sound1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), sound1); - - cd_rom1 = gtk_menu_item_new_with_label ("CD-ROM"); - gtk_widget_ref (cd_rom1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "cd_rom1", cd_rom1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (cd_rom1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), cd_rom1); - - controllers1 = gtk_menu_item_new_with_label ("Controllers"); - gtk_widget_ref (controllers1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "controllers1", controllers1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (controllers1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), controllers1); - - separator4 = gtk_menu_item_new (); - gtk_widget_ref (separator4); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator4", separator4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (separator4); - gtk_container_add (GTK_CONTAINER (configuration1_menu), separator4); - gtk_widget_set_sensitive (separator4, FALSE); - - cpu1 = gtk_menu_item_new_with_label ("Cpu"); - gtk_widget_ref (cpu1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "cpu1", cpu1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (cpu1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), cpu1); - - memory_cards1 = gtk_menu_item_new_with_label ("Memory Cards"); - gtk_widget_ref (memory_cards1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "memory_cards1", memory_cards1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (memory_cards1); - gtk_container_add (GTK_CONTAINER (configuration1_menu), memory_cards1); - - debug1 = gtk_menu_item_new_with_label ("Debug"); - gtk_widget_ref (debug1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "debug1", debug1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (debug1); - gtk_container_add (GTK_CONTAINER (menubar1), debug1); - - help1 = gtk_menu_item_new_with_label ("Help"); - gtk_widget_ref (help1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "help1", help1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (help1); - gtk_container_add (GTK_CONTAINER (menubar1), help1); - - help1_menu = gtk_menu_new (); - gtk_widget_ref (help1_menu); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "help1_menu", help1_menu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (help1), help1_menu); - help1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help1_menu)); - - about_pcsx1 = gtk_menu_item_new_with_label ("About P\251SX"); - gtk_widget_ref (about_pcsx1); - gtk_object_set_data_full (GTK_OBJECT (MainWindow), "about_pcsx1", about_pcsx1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (about_pcsx1); - gtk_container_add (GTK_CONTAINER (help1_menu), about_pcsx1); - - gtk_signal_connect (GTK_OBJECT (MainWindow), "destroy", - GTK_SIGNAL_FUNC (OnDestroy), - NULL); - gtk_signal_connect (GTK_OBJECT (RunCd), "activate", - GTK_SIGNAL_FUNC (OnFile_RunCd), - NULL); - gtk_signal_connect (GTK_OBJECT (RunCdBiois), "activate", - GTK_SIGNAL_FUNC (OnFile_RunCdBios), - NULL); - gtk_signal_connect (GTK_OBJECT (Run_Exe), "activate", - GTK_SIGNAL_FUNC (OnFile_RunExe), - NULL); - gtk_signal_connect (GTK_OBJECT (exit2), "activate", - GTK_SIGNAL_FUNC (OnFile_Exit), - NULL); - gtk_signal_connect (GTK_OBJECT (run1), "activate", - GTK_SIGNAL_FUNC (OnEmu_Run), - NULL); - gtk_signal_connect (GTK_OBJECT (reset1), "activate", - GTK_SIGNAL_FUNC (OnEmu_Reset), - NULL); - gtk_signal_connect (GTK_OBJECT (plugins___bios1), "activate", - GTK_SIGNAL_FUNC (OnConf_Conf), - NULL); - gtk_signal_connect (GTK_OBJECT (graphics1), "activate", - GTK_SIGNAL_FUNC (OnConf_Gpu), - NULL); - gtk_signal_connect (GTK_OBJECT (sound1), "activate", - GTK_SIGNAL_FUNC (OnConf_Spu), - NULL); - gtk_signal_connect (GTK_OBJECT (cd_rom1), "activate", - GTK_SIGNAL_FUNC (OnConf_Cdr), - NULL); - gtk_signal_connect (GTK_OBJECT (controllers1), "activate", - GTK_SIGNAL_FUNC (OnConf_Pads), - NULL); - gtk_signal_connect (GTK_OBJECT (cpu1), "activate", - GTK_SIGNAL_FUNC (OnConf_Cpu), - NULL); - gtk_signal_connect (GTK_OBJECT (memory_cards1), "activate", - GTK_SIGNAL_FUNC (OnConf_Mcds), - NULL); - gtk_signal_connect (GTK_OBJECT (debug1), "activate", - GTK_SIGNAL_FUNC (OnDebug), - NULL); - gtk_signal_connect (GTK_OBJECT (about_pcsx1), "activate", - GTK_SIGNAL_FUNC (OnHelp_About), - NULL); - - return MainWindow; -} - -GtkWidget* -create_AboutDlg (void) -{ - GtkWidget *AboutDlg; - GtkWidget *vbox2; - GtkWidget *packer1; - GtkWidget *hbox1; - GtkWidget *vbox4; - GtkWidget *GtkAbout_LabelVersion; - GtkWidget *frame1; - GtkWidget *vbox6; - GtkWidget *GtkAbout_LabelAuthors; - GtkWidget *pixmap1; - GtkWidget *frame2; - GtkWidget *vbox5; - GtkWidget *GtkAbout_LabelGreets; - GtkWidget *hbuttonbox1; - GtkWidget *button1; - - AboutDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_object_set_data (GTK_OBJECT (AboutDlg), "AboutDlg", AboutDlg); - gtk_container_set_border_width (GTK_CONTAINER (AboutDlg), 10); - gtk_window_set_title (GTK_WINDOW (AboutDlg), "Pcsx About"); - gtk_window_set_position (GTK_WINDOW (AboutDlg), GTK_WIN_POS_CENTER); - - vbox2 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox2); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox2", vbox2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox2); - gtk_container_add (GTK_CONTAINER (AboutDlg), vbox2); - - packer1 = gtk_packer_new (); - gtk_widget_ref (packer1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "packer1", packer1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (packer1); - gtk_box_pack_start (GTK_BOX (vbox2), packer1, FALSE, FALSE, 0); - - hbox1 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "hbox1", hbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox2), hbox1, TRUE, TRUE, 0); - - vbox4 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox4); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox4", vbox4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox4); - gtk_box_pack_start (GTK_BOX (hbox1), vbox4, TRUE, TRUE, 0); - - GtkAbout_LabelVersion = gtk_label_new ("PCSX\r\r\nVersion x.x"); - gtk_widget_ref (GtkAbout_LabelVersion); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelVersion", GtkAbout_LabelVersion, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkAbout_LabelVersion); - gtk_box_pack_start (GTK_BOX (vbox4), GtkAbout_LabelVersion, FALSE, FALSE, 0); - - frame1 = gtk_frame_new (NULL); - gtk_widget_ref (frame1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "frame1", frame1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame1); - gtk_box_pack_start (GTK_BOX (vbox4), frame1, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame1), 5); - - vbox6 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox6); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox6", vbox6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox6); - gtk_container_add (GTK_CONTAINER (frame1), vbox6); - gtk_container_set_border_width (GTK_CONTAINER (vbox6), 5); - - GtkAbout_LabelAuthors = gtk_label_new ("written by..."); - gtk_widget_ref (GtkAbout_LabelAuthors); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelAuthors", GtkAbout_LabelAuthors, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkAbout_LabelAuthors); - gtk_box_pack_start (GTK_BOX (vbox6), GtkAbout_LabelAuthors, FALSE, FALSE, 0); - - pixmap1 = create_pixmap (AboutDlg, "pcsxAbout.xpm"); - gtk_widget_ref (pixmap1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "pixmap1", pixmap1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (pixmap1); - gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, TRUE, TRUE, 0); - - frame2 = gtk_frame_new (NULL); - gtk_widget_ref (frame2); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "frame2", frame2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame2); - gtk_box_pack_start (GTK_BOX (vbox2), frame2, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame2), 5); - - vbox5 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox5); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox5", vbox5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox5); - gtk_container_add (GTK_CONTAINER (frame2), vbox5); - gtk_container_set_border_width (GTK_CONTAINER (vbox5), 5); - - GtkAbout_LabelGreets = gtk_label_new ("greets to..."); - gtk_widget_ref (GtkAbout_LabelGreets); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelGreets", GtkAbout_LabelGreets, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkAbout_LabelGreets); - gtk_box_pack_start (GTK_BOX (vbox5), GtkAbout_LabelGreets, FALSE, FALSE, 0); - - hbuttonbox1 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "hbuttonbox1", hbuttonbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox1); - gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox1, TRUE, TRUE, 0); - - button1 = gtk_button_new_with_label ("Ok"); - gtk_widget_ref (button1); - gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "button1", button1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button1); - gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1); - GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (button1), "clicked", - GTK_SIGNAL_FUNC (OnHelpAbout_Ok), - NULL); - - return AboutDlg; -} - -GtkWidget* -create_ConfDlg (void) -{ - GtkWidget *ConfDlg; - GtkWidget *vbox12; - GtkWidget *table2; - GtkWidget *GtkCombo_Pad1; - GtkWidget *combo_entry4; - GtkWidget *GtkCombo_Pad2; - GtkWidget *combo_entry5; - GtkWidget *GtkCombo_Cdr; - GtkWidget *combo_entry6; - GtkWidget *GtkCombo_Bios; - GtkWidget *combo_entry7; - GtkWidget *hbuttonbox5; - GtkWidget *button6; - GtkWidget *button7; - GtkWidget *button8; - GtkWidget *hbuttonbox6; - GtkWidget *button9; - GtkWidget *button10; - GtkWidget *button11; - GtkWidget *hbuttonbox7; - GtkWidget *button12; - GtkWidget *button13; - GtkWidget *button14; - GtkWidget *hbuttonbox8; - GtkWidget *button15; - GtkWidget *button16; - GtkWidget *button17; - GtkWidget *hbuttonbox9; - GtkWidget *button18; - GtkWidget *button19; - GtkWidget *button20; - GtkWidget *label2; - GtkWidget *label1; - GtkWidget *label3; - GtkWidget *label5; - GtkWidget *label6; - GtkWidget *label4; - GtkWidget *GtkCombo_Gpu; - GtkWidget *combo_entry2; - GtkWidget *GtkCombo_Spu; - GtkWidget *combo_entry3; - GtkWidget *hbox5; - GtkWidget *hbuttonbox11; - GtkWidget *button22; - GtkWidget *button23; - GtkWidget *hbuttonbox10; - GtkWidget *button4; - GtkWidget *button25; - - ConfDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_object_set_data (GTK_OBJECT (ConfDlg), "ConfDlg", ConfDlg); - gtk_container_set_border_width (GTK_CONTAINER (ConfDlg), 10); - gtk_window_set_title (GTK_WINDOW (ConfDlg), "Conf"); - gtk_window_set_position (GTK_WINDOW (ConfDlg), GTK_WIN_POS_CENTER); - - vbox12 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox12); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "vbox12", vbox12, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox12); - gtk_container_add (GTK_CONTAINER (ConfDlg), vbox12); - - table2 = gtk_table_new (9, 2, FALSE); - gtk_widget_ref (table2); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "table2", table2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (table2); - gtk_box_pack_start (GTK_BOX (vbox12), table2, TRUE, TRUE, 0); - gtk_table_set_col_spacings (GTK_TABLE (table2), 15); - - GtkCombo_Pad1 = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Pad1); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Pad1", GtkCombo_Pad1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Pad1); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad1, 0, 1, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry4 = GTK_COMBO (GtkCombo_Pad1)->entry; - gtk_widget_ref (combo_entry4); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry4", combo_entry4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry4); - - GtkCombo_Pad2 = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Pad2); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Pad2", GtkCombo_Pad2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Pad2); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad2, 1, 2, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry5 = GTK_COMBO (GtkCombo_Pad2)->entry; - gtk_widget_ref (combo_entry5); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry5", combo_entry5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry5); - - GtkCombo_Cdr = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Cdr); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Cdr", GtkCombo_Cdr, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Cdr); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Cdr, 0, 1, 7, 8, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry6 = GTK_COMBO (GtkCombo_Cdr)->entry; - gtk_widget_ref (combo_entry6); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry6", combo_entry6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry6); - - GtkCombo_Bios = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Bios); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Bios", GtkCombo_Bios, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Bios); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Bios, 1, 2, 7, 8, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry7 = GTK_COMBO (GtkCombo_Bios)->entry; - gtk_widget_ref (combo_entry7); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry7", combo_entry7, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry7); - - hbuttonbox5 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox5); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox5", hbuttonbox5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox5); - gtk_table_attach (GTK_TABLE (table2), hbuttonbox5, 0, 1, 8, 9, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox5), 0); - - button6 = gtk_button_new_with_label ("Configure"); - gtk_widget_ref (button6); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button6", button6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button6); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), button6); - GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT); - - button7 = gtk_button_new_with_label ("Test"); - gtk_widget_ref (button7); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button7", button7, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button7); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), button7); - GTK_WIDGET_SET_FLAGS (button7, GTK_CAN_DEFAULT); - - button8 = gtk_button_new_with_label ("About"); - gtk_widget_ref (button8); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button8", button8, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button8); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), button8); - GTK_WIDGET_SET_FLAGS (button8, GTK_CAN_DEFAULT); - - hbuttonbox6 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox6); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox6", hbuttonbox6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox6); - gtk_table_attach (GTK_TABLE (table2), hbuttonbox6, 1, 2, 5, 6, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox6), 0); - - button9 = gtk_button_new_with_label ("Configure"); - gtk_widget_ref (button9); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button9", button9, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button9); - gtk_container_add (GTK_CONTAINER (hbuttonbox6), button9); - GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT); - - button10 = gtk_button_new_with_label ("Test"); - gtk_widget_ref (button10); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button10", button10, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button10); - gtk_container_add (GTK_CONTAINER (hbuttonbox6), button10); - GTK_WIDGET_SET_FLAGS (button10, GTK_CAN_DEFAULT); - - button11 = gtk_button_new_with_label ("About"); - gtk_widget_ref (button11); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button11", button11, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button11); - gtk_container_add (GTK_CONTAINER (hbuttonbox6), button11); - GTK_WIDGET_SET_FLAGS (button11, GTK_CAN_DEFAULT); - - hbuttonbox7 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox7); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox7", hbuttonbox7, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox7); - gtk_table_attach (GTK_TABLE (table2), hbuttonbox7, 0, 1, 5, 6, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_FILL), 0, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox7), 0); - - button12 = gtk_button_new_with_label ("Configure"); - gtk_widget_ref (button12); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button12", button12, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button12); - gtk_container_add (GTK_CONTAINER (hbuttonbox7), button12); - GTK_WIDGET_SET_FLAGS (button12, GTK_CAN_DEFAULT); - - button13 = gtk_button_new_with_label ("Test"); - gtk_widget_ref (button13); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button13", button13, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button13); - gtk_container_add (GTK_CONTAINER (hbuttonbox7), button13); - GTK_WIDGET_SET_FLAGS (button13, GTK_CAN_DEFAULT); - - button14 = gtk_button_new_with_label ("About"); - gtk_widget_ref (button14); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button14", button14, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button14); - gtk_container_add (GTK_CONTAINER (hbuttonbox7), button14); - GTK_WIDGET_SET_FLAGS (button14, GTK_CAN_DEFAULT); - - hbuttonbox8 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox8); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox8", hbuttonbox8, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox8); - gtk_table_attach (GTK_TABLE (table2), hbuttonbox8, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox8), 0); - - button15 = gtk_button_new_with_label ("Configure"); - gtk_widget_ref (button15); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button15", button15, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button15); - gtk_container_add (GTK_CONTAINER (hbuttonbox8), button15); - GTK_WIDGET_SET_FLAGS (button15, GTK_CAN_DEFAULT); - - button16 = gtk_button_new_with_label ("Test"); - gtk_widget_ref (button16); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button16", button16, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button16); - gtk_container_add (GTK_CONTAINER (hbuttonbox8), button16); - GTK_WIDGET_SET_FLAGS (button16, GTK_CAN_DEFAULT); - - button17 = gtk_button_new_with_label ("About"); - gtk_widget_ref (button17); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button17", button17, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button17); - gtk_container_add (GTK_CONTAINER (hbuttonbox8), button17); - GTK_WIDGET_SET_FLAGS (button17, GTK_CAN_DEFAULT); - - hbuttonbox9 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox9); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox9", hbuttonbox9, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox9); - gtk_table_attach (GTK_TABLE (table2), hbuttonbox9, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_FILL), 0, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox9), 0); - - button18 = gtk_button_new_with_label ("Configure"); - gtk_widget_ref (button18); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button18", button18, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button18); - gtk_container_add (GTK_CONTAINER (hbuttonbox9), button18); - GTK_WIDGET_SET_FLAGS (button18, GTK_CAN_DEFAULT); - - button19 = gtk_button_new_with_label ("Test"); - gtk_widget_ref (button19); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button19", button19, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button19); - gtk_container_add (GTK_CONTAINER (hbuttonbox9), button19); - GTK_WIDGET_SET_FLAGS (button19, GTK_CAN_DEFAULT); - - button20 = gtk_button_new_with_label ("About"); - gtk_widget_ref (button20); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button20", button20, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button20); - gtk_container_add (GTK_CONTAINER (hbuttonbox9), button20); - GTK_WIDGET_SET_FLAGS (button20, GTK_CAN_DEFAULT); - - label2 = gtk_label_new ("Sound"); - gtk_widget_ref (label2); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label2", label2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label2); - gtk_table_attach (GTK_TABLE (table2), label2, 1, 2, 0, 1, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); - - label1 = gtk_label_new ("Graphics"); - gtk_widget_ref (label1); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label1", label1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label1); - gtk_table_attach (GTK_TABLE (table2), label1, 0, 1, 0, 1, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); - - label3 = gtk_label_new ("First Controller"); - gtk_widget_ref (label3); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label3", label3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label3); - gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 3, 4, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); - - label5 = gtk_label_new ("Cdrom"); - gtk_widget_ref (label5); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label5", label5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label5); - gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 6, 7, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); - - label6 = gtk_label_new ("Bios"); - gtk_widget_ref (label6); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label6", label6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label6); - gtk_table_attach (GTK_TABLE (table2), label6, 1, 2, 6, 7, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); - - label4 = gtk_label_new ("Second Controller"); - gtk_widget_ref (label4); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label4", label4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label4); - gtk_table_attach (GTK_TABLE (table2), label4, 1, 2, 3, 4, - (GtkAttachOptions) (0), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); - - GtkCombo_Gpu = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Gpu); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Gpu", GtkCombo_Gpu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Gpu); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Gpu, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry2 = GTK_COMBO (GtkCombo_Gpu)->entry; - gtk_widget_ref (combo_entry2); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry2", combo_entry2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry2); - - GtkCombo_Spu = gtk_combo_new (); - gtk_widget_ref (GtkCombo_Spu); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Spu", GtkCombo_Spu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_Spu); - gtk_table_attach (GTK_TABLE (table2), GtkCombo_Spu, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - combo_entry3 = GTK_COMBO (GtkCombo_Spu)->entry; - gtk_widget_ref (combo_entry3); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry3", combo_entry3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry3); - - hbox5 = gtk_hbox_new (FALSE, 14); - gtk_widget_ref (hbox5); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbox5", hbox5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox5); - gtk_box_pack_start (GTK_BOX (vbox12), hbox5, TRUE, TRUE, 0); - - hbuttonbox11 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox11); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox11", hbuttonbox11, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox11); - gtk_box_pack_start (GTK_BOX (hbox5), hbuttonbox11, TRUE, TRUE, 0); - gtk_widget_set_usize (hbuttonbox11, 169, -2); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox11), 0); - - button22 = gtk_button_new_with_label ("Select Plugins Dir"); - gtk_widget_ref (button22); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button22", button22, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button22); - gtk_container_add (GTK_CONTAINER (hbuttonbox11), button22); - gtk_widget_set_usize (button22, 109, -2); - GTK_WIDGET_SET_FLAGS (button22, GTK_CAN_DEFAULT); - - button23 = gtk_button_new_with_label ("Select Bios Dir"); - gtk_widget_ref (button23); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button23", button23, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button23); - gtk_container_add (GTK_CONTAINER (hbuttonbox11), button23); - GTK_WIDGET_SET_FLAGS (button23, GTK_CAN_DEFAULT); - - hbuttonbox10 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox10); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox10", hbuttonbox10, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox10); - gtk_box_pack_start (GTK_BOX (hbox5), hbuttonbox10, TRUE, TRUE, 0); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox10), 0); - - button4 = gtk_button_new_with_label ("Ok"); - gtk_widget_ref (button4); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button4", button4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button4); - gtk_container_add (GTK_CONTAINER (hbuttonbox10), button4); - GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT); - - button25 = gtk_button_new_with_label ("Cancel"); - gtk_widget_ref (button25); - gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button25", button25, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button25); - gtk_container_add (GTK_CONTAINER (hbuttonbox10), button25); - GTK_WIDGET_SET_FLAGS (button25, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (button6), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_CdrConf), - NULL); - gtk_signal_connect (GTK_OBJECT (button7), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_CdrTest), - NULL); - gtk_signal_connect (GTK_OBJECT (button8), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_CdrAbout), - NULL); - gtk_signal_connect (GTK_OBJECT (button9), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad2Conf), - NULL); - gtk_signal_connect (GTK_OBJECT (button10), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad2Test), - NULL); - gtk_signal_connect (GTK_OBJECT (button11), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad2About), - NULL); - gtk_signal_connect (GTK_OBJECT (button12), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad1Conf), - NULL); - gtk_signal_connect (GTK_OBJECT (button13), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad1Test), - NULL); - gtk_signal_connect (GTK_OBJECT (button14), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Pad1About), - NULL); - gtk_signal_connect (GTK_OBJECT (button15), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_GpuConf), - NULL); - gtk_signal_connect (GTK_OBJECT (button16), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_GpuTest), - NULL); - gtk_signal_connect (GTK_OBJECT (button17), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_GpuAbout), - NULL); - gtk_signal_connect (GTK_OBJECT (button18), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_SpuConf), - NULL); - gtk_signal_connect (GTK_OBJECT (button19), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_SpuTest), - NULL); - gtk_signal_connect (GTK_OBJECT (button20), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_SpuAbout), - NULL); - gtk_signal_connect (GTK_OBJECT (button22), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_PluginsPath), - NULL); - gtk_signal_connect (GTK_OBJECT (button23), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_BiosPath), - NULL); - gtk_signal_connect (GTK_OBJECT (button4), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Ok), - NULL); - gtk_signal_connect (GTK_OBJECT (button25), "clicked", - GTK_SIGNAL_FUNC (OnConfConf_Cancel), - NULL); - - return ConfDlg; -} - -GtkWidget* -create_CpuDlg (void) -{ - GtkWidget *CpuDlg; - GtkWidget *vbox8; - GtkWidget *frame3; - GtkWidget *vbox15; - GtkWidget *table1; - GtkWidget *GtkCheckButton_Xa; - GtkWidget *GtkCheckButton_Cdda; - GtkWidget *GtkCheckButton_Sio; - GtkWidget *GtkCheckButton_Cpu; - GtkWidget *GtkCheckButton_PsxOut; - GtkWidget *GtkCheckButton_Mdec; - GtkWidget *GtkCheckButton_SpuIrq; - GtkWidget *GtkCheckButton_CpuLog; - GtkWidget *GtkCheckButton_CdTiming; - GtkWidget *frame6; - GtkWidget *hbox4; - GtkWidget *GtkCheckButton_PsxAuto; - GtkWidget *GtkCombo_PsxType; - GtkWidget *combo_entry1; - GtkWidget *hbuttonbox3; - GtkWidget *button2; - GtkWidget *button3; - - CpuDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_object_set_data (GTK_OBJECT (CpuDlg), "CpuDlg", CpuDlg); - gtk_container_set_border_width (GTK_CONTAINER (CpuDlg), 5); - gtk_window_set_title (GTK_WINDOW (CpuDlg), "Cpu"); - gtk_window_set_position (GTK_WINDOW (CpuDlg), GTK_WIN_POS_CENTER); - - vbox8 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox8); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "vbox8", vbox8, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox8); - gtk_container_add (GTK_CONTAINER (CpuDlg), vbox8); - - frame3 = gtk_frame_new ("Options"); - gtk_widget_ref (frame3); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "frame3", frame3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame3); - gtk_box_pack_start (GTK_BOX (vbox8), frame3, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame3), 5); - - vbox15 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox15); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "vbox15", vbox15, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox15); - gtk_container_add (GTK_CONTAINER (frame3), vbox15); - gtk_container_set_border_width (GTK_CONTAINER (vbox15), 5); - - table1 = gtk_table_new (4, 2, FALSE); - gtk_widget_ref (table1); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "table1", table1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (table1); - gtk_box_pack_start (GTK_BOX (vbox15), table1, TRUE, TRUE, 0); - - GtkCheckButton_Xa = gtk_check_button_new_with_label ("Disable Xa Decoding"); - gtk_widget_ref (GtkCheckButton_Xa); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Xa", GtkCheckButton_Xa, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_Xa); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Xa, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_Cdda = gtk_check_button_new_with_label ("Disable Cd Audio"); - gtk_widget_ref (GtkCheckButton_Cdda); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Cdda", GtkCheckButton_Cdda, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_Cdda); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Cdda, 1, 2, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_Sio = gtk_check_button_new_with_label ("Sio Irq Always Enabled"); - gtk_widget_ref (GtkCheckButton_Sio); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Sio", GtkCheckButton_Sio, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_Sio); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Sio, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_Cpu = gtk_check_button_new_with_label ("Enable Interpreter Cpu"); - gtk_widget_ref (GtkCheckButton_Cpu); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Cpu", GtkCheckButton_Cpu, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_Cpu); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Cpu, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_PsxOut = gtk_check_button_new_with_label ("Enable Console Output"); - gtk_widget_ref (GtkCheckButton_PsxOut); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_PsxOut", GtkCheckButton_PsxOut, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_PsxOut); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_PsxOut, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_Mdec = gtk_check_button_new_with_label ("Black & White Movies"); - gtk_widget_ref (GtkCheckButton_Mdec); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Mdec", GtkCheckButton_Mdec, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_Mdec); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Mdec, 0, 1, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_SpuIrq = gtk_check_button_new_with_label ("Spu Irq Always Enabled"); - gtk_widget_ref (GtkCheckButton_SpuIrq); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_SpuIrq", GtkCheckButton_SpuIrq, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_SpuIrq); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_SpuIrq, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_CpuLog = gtk_check_button_new_with_label ("Enable CPU Log"); - gtk_widget_ref (GtkCheckButton_CpuLog); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_CpuLog", GtkCheckButton_CpuLog, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_CpuLog); - gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_CpuLog, 1, 2, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - GtkCheckButton_CdTiming = gtk_check_button_new_with_label ("Old Cdrom Timing (Gran Turismo...)"); - gtk_widget_ref (GtkCheckButton_CdTiming); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_CdTiming", GtkCheckButton_CdTiming, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_CdTiming); - gtk_box_pack_start (GTK_BOX (vbox15), GtkCheckButton_CdTiming, FALSE, FALSE, 0); - - frame6 = gtk_frame_new ("Psx System Type"); - gtk_widget_ref (frame6); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "frame6", frame6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame6); - gtk_box_pack_start (GTK_BOX (vbox8), frame6, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame6), 5); - - hbox4 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox4); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "hbox4", hbox4, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox4); - gtk_container_add (GTK_CONTAINER (frame6), hbox4); - gtk_container_set_border_width (GTK_CONTAINER (hbox4), 5); - - GtkCheckButton_PsxAuto = gtk_check_button_new_with_label ("Autodetect"); - gtk_widget_ref (GtkCheckButton_PsxAuto); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_PsxAuto", GtkCheckButton_PsxAuto, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCheckButton_PsxAuto); - gtk_box_pack_start (GTK_BOX (hbox4), GtkCheckButton_PsxAuto, FALSE, FALSE, 0); - gtk_widget_set_usize (GtkCheckButton_PsxAuto, 159, -2); - - GtkCombo_PsxType = gtk_combo_new (); - gtk_widget_ref (GtkCombo_PsxType); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCombo_PsxType", GtkCombo_PsxType, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCombo_PsxType); - gtk_box_pack_start (GTK_BOX (hbox4), GtkCombo_PsxType, FALSE, FALSE, 0); - gtk_widget_set_usize (GtkCombo_PsxType, 154, -2); - - combo_entry1 = GTK_COMBO (GtkCombo_PsxType)->entry; - gtk_widget_ref (combo_entry1); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "combo_entry1", combo_entry1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (combo_entry1); - gtk_entry_set_editable (GTK_ENTRY (combo_entry1), FALSE); - - hbuttonbox3 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox3); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "hbuttonbox3", hbuttonbox3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox3); - gtk_box_pack_start (GTK_BOX (vbox8), hbuttonbox3, TRUE, TRUE, 0); - - button2 = gtk_button_new_with_label ("Ok"); - gtk_widget_ref (button2); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "button2", button2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button2); - gtk_container_add (GTK_CONTAINER (hbuttonbox3), button2); - GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT); - - button3 = gtk_button_new_with_label ("Cancel"); - gtk_widget_ref (button3); - gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "button3", button3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button3); - gtk_container_add (GTK_CONTAINER (hbuttonbox3), button3); - GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (button2), "clicked", - GTK_SIGNAL_FUNC (OnCpu_Ok), - NULL); - gtk_signal_connect (GTK_OBJECT (button3), "clicked", - GTK_SIGNAL_FUNC (OnCpu_Cancel), - NULL); - - return CpuDlg; -} - -GtkWidget* -create_McdsDlg (void) -{ - GtkWidget *McdsDlg; - GtkWidget *vbox10; - GtkWidget *hbox6; - GtkWidget *frame7; - GtkWidget *vbox13; - GtkWidget *scrolledwindow1; - GtkWidget *GtkCList_McdList1; - GtkWidget *label9; - GtkWidget *label10; - GtkWidget *label11; - GtkWidget *label15; - GtkWidget *label16; - GtkWidget *hbuttonbox12; - GtkWidget *GtkButton_SelMcd1; - GtkWidget *GtkButton_Format1; - GtkWidget *GtkButton_Reload1; - GtkWidget *GtkEntry_Mcd1; - GtkWidget *vbuttonbox1; - GtkWidget *button26; - GtkWidget *button28; - GtkWidget *GtkButton_McdPaste; - GtkWidget *button29; - GtkWidget *button30; - GtkWidget *frame8; - GtkWidget *vbox14; - GtkWidget *scrolledwindow2; - GtkWidget *GtkCList_McdList2; - GtkWidget *label12; - GtkWidget *label13; - GtkWidget *label14; - GtkWidget *label17; - GtkWidget *label18; - GtkWidget *hbuttonbox13; - GtkWidget *GtkButton_SelMcd2; - GtkWidget *GtkButton_Format2; - GtkWidget *GtkButton_Reload2; - GtkWidget *GtkEntry_Mcd2; - GtkWidget *hbuttonbox2; - GtkWidget *GtkMcds_Ok; - GtkWidget *GtkMcds_Cancel; - - McdsDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_object_set_data (GTK_OBJECT (McdsDlg), "McdsDlg", McdsDlg); - gtk_container_set_border_width (GTK_CONTAINER (McdsDlg), 5); - gtk_window_set_title (GTK_WINDOW (McdsDlg), "Mcds"); - gtk_window_set_position (GTK_WINDOW (McdsDlg), GTK_WIN_POS_CENTER); - - vbox10 = gtk_vbox_new (FALSE, 5); - gtk_widget_ref (vbox10); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox10", vbox10, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox10); - gtk_container_add (GTK_CONTAINER (McdsDlg), vbox10); - - hbox6 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox6); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbox6", hbox6, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox6); - gtk_box_pack_start (GTK_BOX (vbox10), hbox6, TRUE, TRUE, 0); - - frame7 = gtk_frame_new ("Memory Card 1"); - gtk_widget_ref (frame7); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "frame7", frame7, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame7); - gtk_box_pack_start (GTK_BOX (hbox6), frame7, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame7), 5); - - vbox13 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox13); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox13", vbox13, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox13); - gtk_container_add (GTK_CONTAINER (frame7), vbox13); - gtk_container_set_border_width (GTK_CONTAINER (vbox13), 5); - - scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "scrolledwindow1", scrolledwindow1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow1); - gtk_box_pack_start (GTK_BOX (vbox13), scrolledwindow1, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - GtkCList_McdList1 = gtk_clist_new (5); - gtk_widget_ref (GtkCList_McdList1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkCList_McdList1", GtkCList_McdList1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCList_McdList1); - gtk_container_add (GTK_CONTAINER (scrolledwindow1), GtkCList_McdList1); - gtk_widget_set_usize (GtkCList_McdList1, -2, 180); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 0, 25); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 1, 180); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 2, 50); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 3, 80); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 4, 80); - gtk_clist_column_titles_show (GTK_CLIST (GtkCList_McdList1)); - - label9 = gtk_label_new ("Icon"); - gtk_widget_ref (label9); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label9", label9, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label9); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 0, label9); - - label10 = gtk_label_new ("Title"); - gtk_widget_ref (label10); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label10", label10, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label10); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 1, label10); - - label11 = gtk_label_new ("Status"); - gtk_widget_ref (label11); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label11", label11, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label11); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 2, label11); - - label15 = gtk_label_new ("Game ID"); - gtk_widget_ref (label15); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label15", label15, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label15); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 3, label15); - - label16 = gtk_label_new ("Game"); - gtk_widget_ref (label16); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label16", label16, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label16); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 4, label16); - - hbuttonbox12 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox12); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox12", hbuttonbox12, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox12); - gtk_box_pack_start (GTK_BOX (vbox13), hbuttonbox12, TRUE, TRUE, 0); - gtk_widget_set_usize (hbuttonbox12, 240, -2); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox12), 0); - gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox12), 70, 27); - - GtkButton_SelMcd1 = gtk_button_new_with_label ("Select"); - gtk_widget_ref (GtkButton_SelMcd1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_SelMcd1", GtkButton_SelMcd1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_SelMcd1); - gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_SelMcd1); - GTK_WIDGET_SET_FLAGS (GtkButton_SelMcd1, GTK_CAN_DEFAULT); - - GtkButton_Format1 = gtk_button_new_with_label ("Format"); - gtk_widget_ref (GtkButton_Format1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Format1", GtkButton_Format1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_Format1); - gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_Format1); - GTK_WIDGET_SET_FLAGS (GtkButton_Format1, GTK_CAN_DEFAULT); - - GtkButton_Reload1 = gtk_button_new_with_label ("Reload"); - gtk_widget_ref (GtkButton_Reload1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Reload1", GtkButton_Reload1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_Reload1); - gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_Reload1); - GTK_WIDGET_SET_FLAGS (GtkButton_Reload1, GTK_CAN_DEFAULT); - - GtkEntry_Mcd1 = gtk_entry_new (); - gtk_widget_ref (GtkEntry_Mcd1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkEntry_Mcd1", GtkEntry_Mcd1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkEntry_Mcd1); - gtk_box_pack_start (GTK_BOX (vbox13), GtkEntry_Mcd1, FALSE, FALSE, 0); - - vbuttonbox1 = gtk_vbutton_box_new (); - gtk_widget_ref (vbuttonbox1); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbuttonbox1", vbuttonbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbuttonbox1); - gtk_box_pack_start (GTK_BOX (hbox6), vbuttonbox1, TRUE, FALSE, 0); - gtk_button_box_set_layout (GTK_BUTTON_BOX (vbuttonbox1), GTK_BUTTONBOX_SPREAD); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (vbuttonbox1), 0); - gtk_button_box_set_child_size (GTK_BUTTON_BOX (vbuttonbox1), 64, 27); - gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (vbuttonbox1), 0, 0); - - button26 = gtk_button_new_with_label ("-> Copy ->"); - gtk_widget_ref (button26); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button26", button26, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button26); - gtk_container_add (GTK_CONTAINER (vbuttonbox1), button26); - GTK_WIDGET_SET_FLAGS (button26, GTK_CAN_DEFAULT); - - button28 = gtk_button_new_with_label ("<- Copy <-"); - gtk_widget_ref (button28); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button28", button28, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button28); - gtk_container_add (GTK_CONTAINER (vbuttonbox1), button28); - GTK_WIDGET_SET_FLAGS (button28, GTK_CAN_DEFAULT); - - GtkButton_McdPaste = gtk_button_new_with_label ("Paste"); - gtk_widget_ref (GtkButton_McdPaste); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_McdPaste", GtkButton_McdPaste, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_McdPaste); - gtk_container_add (GTK_CONTAINER (vbuttonbox1), GtkButton_McdPaste); - GTK_WIDGET_SET_FLAGS (GtkButton_McdPaste, GTK_CAN_DEFAULT); - - button29 = gtk_button_new_with_label ("Un/Delete ->"); - gtk_widget_ref (button29); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button29", button29, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button29); - gtk_container_add (GTK_CONTAINER (vbuttonbox1), button29); - GTK_WIDGET_SET_FLAGS (button29, GTK_CAN_DEFAULT); - - button30 = gtk_button_new_with_label ("<- Un/Delete"); - gtk_widget_ref (button30); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button30", button30, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button30); - gtk_container_add (GTK_CONTAINER (vbuttonbox1), button30); - GTK_WIDGET_SET_FLAGS (button30, GTK_CAN_DEFAULT); - - frame8 = gtk_frame_new ("Memory Card 2"); - gtk_widget_ref (frame8); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "frame8", frame8, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame8); - gtk_box_pack_start (GTK_BOX (hbox6), frame8, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame8), 5); - - vbox14 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox14); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox14", vbox14, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox14); - gtk_container_add (GTK_CONTAINER (frame8), vbox14); - gtk_container_set_border_width (GTK_CONTAINER (vbox14), 5); - - scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "scrolledwindow2", scrolledwindow2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow2); - gtk_box_pack_start (GTK_BOX (vbox14), scrolledwindow2, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - GtkCList_McdList2 = gtk_clist_new (5); - gtk_widget_ref (GtkCList_McdList2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkCList_McdList2", GtkCList_McdList2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkCList_McdList2); - gtk_container_add (GTK_CONTAINER (scrolledwindow2), GtkCList_McdList2); - gtk_widget_set_usize (GtkCList_McdList2, -2, 180); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 0, 25); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 1, 180); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 2, 50); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 3, 80); - gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 4, 80); - gtk_clist_column_titles_show (GTK_CLIST (GtkCList_McdList2)); - - label12 = gtk_label_new ("Icon"); - gtk_widget_ref (label12); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label12", label12, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label12); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 0, label12); - - label13 = gtk_label_new ("Title"); - gtk_widget_ref (label13); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label13", label13, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label13); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 1, label13); - - label14 = gtk_label_new ("Status"); - gtk_widget_ref (label14); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label14", label14, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label14); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 2, label14); - - label17 = gtk_label_new ("Game ID"); - gtk_widget_ref (label17); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label17", label17, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label17); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 3, label17); - - label18 = gtk_label_new ("Game"); - gtk_widget_ref (label18); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label18", label18, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label18); - gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 4, label18); - - hbuttonbox13 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox13); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox13", hbuttonbox13, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox13); - gtk_box_pack_start (GTK_BOX (vbox14), hbuttonbox13, TRUE, TRUE, 0); - gtk_widget_set_usize (hbuttonbox13, 240, -2); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox13), 0); - gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox13), 70, 27); - - GtkButton_SelMcd2 = gtk_button_new_with_label ("Select"); - gtk_widget_ref (GtkButton_SelMcd2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_SelMcd2", GtkButton_SelMcd2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_SelMcd2); - gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_SelMcd2); - GTK_WIDGET_SET_FLAGS (GtkButton_SelMcd2, GTK_CAN_DEFAULT); - - GtkButton_Format2 = gtk_button_new_with_label ("Format"); - gtk_widget_ref (GtkButton_Format2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Format2", GtkButton_Format2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_Format2); - gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_Format2); - GTK_WIDGET_SET_FLAGS (GtkButton_Format2, GTK_CAN_DEFAULT); - - GtkButton_Reload2 = gtk_button_new_with_label ("Reload"); - gtk_widget_ref (GtkButton_Reload2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Reload2", GtkButton_Reload2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_Reload2); - gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_Reload2); - GTK_WIDGET_SET_FLAGS (GtkButton_Reload2, GTK_CAN_DEFAULT); - - GtkEntry_Mcd2 = gtk_entry_new (); - gtk_widget_ref (GtkEntry_Mcd2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkEntry_Mcd2", GtkEntry_Mcd2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkEntry_Mcd2); - gtk_box_pack_start (GTK_BOX (vbox14), GtkEntry_Mcd2, FALSE, FALSE, 0); - - hbuttonbox2 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox2); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox2", hbuttonbox2, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox2); - gtk_box_pack_start (GTK_BOX (vbox10), hbuttonbox2, TRUE, TRUE, 0); - - GtkMcds_Ok = gtk_button_new_with_label ("Ok"); - gtk_widget_ref (GtkMcds_Ok); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkMcds_Ok", GtkMcds_Ok, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkMcds_Ok); - gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkMcds_Ok); - GTK_WIDGET_SET_FLAGS (GtkMcds_Ok, GTK_CAN_DEFAULT); - - GtkMcds_Cancel = gtk_button_new_with_label ("Cancel"); - gtk_widget_ref (GtkMcds_Cancel); - gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkMcds_Cancel", GtkMcds_Cancel, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkMcds_Cancel); - gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkMcds_Cancel); - GTK_WIDGET_SET_FLAGS (GtkMcds_Cancel, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (GtkButton_SelMcd1), "clicked", - GTK_SIGNAL_FUNC (OnMcd_FS1), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_Format1), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Format1), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_Reload1), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Reload1), - NULL); - gtk_signal_connect (GTK_OBJECT (button26), "clicked", - GTK_SIGNAL_FUNC (OnMcd_CopyTo2), - NULL); - gtk_signal_connect (GTK_OBJECT (button28), "clicked", - GTK_SIGNAL_FUNC (OnMcd_CopyTo1), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_McdPaste), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Paste), - NULL); - gtk_signal_connect (GTK_OBJECT (button29), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Delete2), - NULL); - gtk_signal_connect (GTK_OBJECT (button30), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Delete1), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_SelMcd2), "clicked", - GTK_SIGNAL_FUNC (OnMcd_FS2), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_Format2), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Format2), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkButton_Reload2), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Reload2), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkMcds_Ok), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Ok), - NULL); - gtk_signal_connect (GTK_OBJECT (GtkMcds_Cancel), "clicked", - GTK_SIGNAL_FUNC (OnMcd_Cancel), - NULL); - - return McdsDlg; -} - -GtkWidget* -create_DebugDlg (void) -{ - GtkWidget *DebugDlg; - GtkWidget *vbox17; - GtkWidget *scrolledwindow3; - GtkWidget *text1; - GtkWidget *hbuttonbox14; - GtkWidget *GtkButton_DbgOk; - - DebugDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_object_set_data (GTK_OBJECT (DebugDlg), "DebugDlg", DebugDlg); - gtk_container_set_border_width (GTK_CONTAINER (DebugDlg), 5); - gtk_window_set_title (GTK_WINDOW (DebugDlg), "Debug"); - - vbox17 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox17); - gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "vbox17", vbox17, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox17); - gtk_container_add (GTK_CONTAINER (DebugDlg), vbox17); - - scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow3); - gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "scrolledwindow3", scrolledwindow3, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow3); - gtk_box_pack_start (GTK_BOX (vbox17), scrolledwindow3, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - text1 = gtk_text_new (NULL, NULL); - gtk_widget_ref (text1); - gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "text1", text1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (text1); - gtk_container_add (GTK_CONTAINER (scrolledwindow3), text1); - gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL, - "Test", 4); - - hbuttonbox14 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox14); - gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "hbuttonbox14", hbuttonbox14, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox14); - gtk_box_pack_start (GTK_BOX (vbox17), hbuttonbox14, TRUE, TRUE, 0); - - GtkButton_DbgOk = gtk_button_new_with_label ("Ok"); - gtk_widget_ref (GtkButton_DbgOk); - gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "GtkButton_DbgOk", GtkButton_DbgOk, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (GtkButton_DbgOk); - gtk_container_add (GTK_CONTAINER (hbuttonbox14), GtkButton_DbgOk); - GTK_WIDGET_SET_FLAGS (GtkButton_DbgOk, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (GtkButton_DbgOk), "clicked", - GTK_SIGNAL_FUNC (OnDebug_Ok), - NULL); - - return DebugDlg; -} - +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include +#include + +#include "GladeCalls.h" +#include "GladeGui.h" +#include "GladeFuncs.h" + +GtkWidget* +create_MainWindow (void) +{ + GtkWidget *MainWindow; + GtkWidget *vbox1; + GtkWidget *menubar1; + GtkWidget *item1; + GtkWidget *item1_menu; + GtkAccelGroup *item1_menu_accels; + GtkWidget *RunCd; + GtkWidget *RunCdBiois; + GtkWidget *Run_Exe; + GtkWidget *separator2; + GtkWidget *exit2; + GtkWidget *emulator1; + GtkWidget *emulator1_menu; + GtkAccelGroup *emulator1_menu_accels; + GtkWidget *run1; + GtkWidget *reset1; + GtkWidget *configuration1; + GtkWidget *configuration1_menu; + GtkAccelGroup *configuration1_menu_accels; + GtkWidget *plugins___bios1; + GtkWidget *separator3; + GtkWidget *graphics1; + GtkWidget *sound1; + GtkWidget *cd_rom1; + GtkWidget *controllers1; + GtkWidget *separator4; + GtkWidget *cpu1; + GtkWidget *memory_cards1; + GtkWidget *debug1; + GtkWidget *help1; + GtkWidget *help1_menu; + GtkAccelGroup *help1_menu_accels; + GtkWidget *about_pcsx1; + + MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (MainWindow), "MainWindow", MainWindow); + gtk_widget_set_usize (MainWindow, 350, 200); + gtk_window_set_title (GTK_WINDOW (MainWindow), "PCSX"); + gtk_window_set_position (GTK_WINDOW (MainWindow), GTK_WIN_POS_CENTER); + gtk_window_set_policy (GTK_WINDOW (MainWindow), FALSE, FALSE, FALSE); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "vbox1", vbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (MainWindow), vbox1); + + menubar1 = gtk_menu_bar_new (); + gtk_widget_ref (menubar1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "menubar1", menubar1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (menubar1); + gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0); + + item1 = gtk_menu_item_new_with_label ("File"); + gtk_widget_ref (item1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "item1", item1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (item1); + gtk_container_add (GTK_CONTAINER (menubar1), item1); + + item1_menu = gtk_menu_new (); + gtk_widget_ref (item1_menu); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "item1_menu", item1_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item1), item1_menu); + item1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (item1_menu)); + + RunCd = gtk_menu_item_new_with_label ("Run Cd"); + gtk_widget_ref (RunCd); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "RunCd", RunCd, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (RunCd); + gtk_container_add (GTK_CONTAINER (item1_menu), RunCd); + + RunCdBiois = gtk_menu_item_new_with_label ("Run Cd Through Bios"); + gtk_widget_ref (RunCdBiois); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "RunCdBiois", RunCdBiois, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (RunCdBiois); + gtk_container_add (GTK_CONTAINER (item1_menu), RunCdBiois); + + Run_Exe = gtk_menu_item_new_with_label ("Run Exe"); + gtk_widget_ref (Run_Exe); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "Run_Exe", Run_Exe, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (Run_Exe); + gtk_container_add (GTK_CONTAINER (item1_menu), Run_Exe); + + separator2 = gtk_menu_item_new (); + gtk_widget_ref (separator2); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator2", separator2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (separator2); + gtk_container_add (GTK_CONTAINER (item1_menu), separator2); + gtk_widget_set_sensitive (separator2, FALSE); + + exit2 = gtk_menu_item_new_with_label ("Exit"); + gtk_widget_ref (exit2); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "exit2", exit2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (exit2); + gtk_container_add (GTK_CONTAINER (item1_menu), exit2); + + emulator1 = gtk_menu_item_new_with_label ("Emulator"); + gtk_widget_ref (emulator1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "emulator1", emulator1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (emulator1); + gtk_container_add (GTK_CONTAINER (menubar1), emulator1); + + emulator1_menu = gtk_menu_new (); + gtk_widget_ref (emulator1_menu); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "emulator1_menu", emulator1_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (emulator1), emulator1_menu); + emulator1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (emulator1_menu)); + + run1 = gtk_menu_item_new_with_label ("Run"); + gtk_widget_ref (run1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "run1", run1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (run1); + gtk_container_add (GTK_CONTAINER (emulator1_menu), run1); + + reset1 = gtk_menu_item_new_with_label ("Reset"); + gtk_widget_ref (reset1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "reset1", reset1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (reset1); + gtk_container_add (GTK_CONTAINER (emulator1_menu), reset1); + + configuration1 = gtk_menu_item_new_with_label ("Configuration"); + gtk_widget_ref (configuration1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "configuration1", configuration1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (configuration1); + gtk_container_add (GTK_CONTAINER (menubar1), configuration1); + + configuration1_menu = gtk_menu_new (); + gtk_widget_ref (configuration1_menu); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "configuration1_menu", configuration1_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (configuration1), configuration1_menu); + configuration1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (configuration1_menu)); + + plugins___bios1 = gtk_menu_item_new_with_label ("Plugins & Bios"); + gtk_widget_ref (plugins___bios1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "plugins___bios1", plugins___bios1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (plugins___bios1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), plugins___bios1); + + separator3 = gtk_menu_item_new (); + gtk_widget_ref (separator3); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator3", separator3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (separator3); + gtk_container_add (GTK_CONTAINER (configuration1_menu), separator3); + gtk_widget_set_sensitive (separator3, FALSE); + + graphics1 = gtk_menu_item_new_with_label ("Graphics"); + gtk_widget_ref (graphics1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "graphics1", graphics1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (graphics1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), graphics1); + + sound1 = gtk_menu_item_new_with_label ("Sound"); + gtk_widget_ref (sound1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "sound1", sound1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (sound1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), sound1); + + cd_rom1 = gtk_menu_item_new_with_label ("CD-ROM"); + gtk_widget_ref (cd_rom1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "cd_rom1", cd_rom1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cd_rom1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), cd_rom1); + + controllers1 = gtk_menu_item_new_with_label ("Controllers"); + gtk_widget_ref (controllers1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "controllers1", controllers1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (controllers1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), controllers1); + + separator4 = gtk_menu_item_new (); + gtk_widget_ref (separator4); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "separator4", separator4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (separator4); + gtk_container_add (GTK_CONTAINER (configuration1_menu), separator4); + gtk_widget_set_sensitive (separator4, FALSE); + + cpu1 = gtk_menu_item_new_with_label ("Cpu"); + gtk_widget_ref (cpu1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "cpu1", cpu1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (cpu1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), cpu1); + + memory_cards1 = gtk_menu_item_new_with_label ("Memory Cards"); + gtk_widget_ref (memory_cards1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "memory_cards1", memory_cards1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (memory_cards1); + gtk_container_add (GTK_CONTAINER (configuration1_menu), memory_cards1); + + debug1 = gtk_menu_item_new_with_label ("Debug"); + gtk_widget_ref (debug1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "debug1", debug1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (debug1); + gtk_container_add (GTK_CONTAINER (menubar1), debug1); + + help1 = gtk_menu_item_new_with_label ("Help"); + gtk_widget_ref (help1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "help1", help1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (help1); + gtk_container_add (GTK_CONTAINER (menubar1), help1); + + help1_menu = gtk_menu_new (); + gtk_widget_ref (help1_menu); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "help1_menu", help1_menu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (help1), help1_menu); + help1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help1_menu)); + + about_pcsx1 = gtk_menu_item_new_with_label ("About P\251SX"); + gtk_widget_ref (about_pcsx1); + gtk_object_set_data_full (GTK_OBJECT (MainWindow), "about_pcsx1", about_pcsx1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (about_pcsx1); + gtk_container_add (GTK_CONTAINER (help1_menu), about_pcsx1); + + gtk_signal_connect (GTK_OBJECT (MainWindow), "destroy", + GTK_SIGNAL_FUNC (OnDestroy), + NULL); + gtk_signal_connect (GTK_OBJECT (RunCd), "activate", + GTK_SIGNAL_FUNC (OnFile_RunCd), + NULL); + gtk_signal_connect (GTK_OBJECT (RunCdBiois), "activate", + GTK_SIGNAL_FUNC (OnFile_RunCdBios), + NULL); + gtk_signal_connect (GTK_OBJECT (Run_Exe), "activate", + GTK_SIGNAL_FUNC (OnFile_RunExe), + NULL); + gtk_signal_connect (GTK_OBJECT (exit2), "activate", + GTK_SIGNAL_FUNC (OnFile_Exit), + NULL); + gtk_signal_connect (GTK_OBJECT (run1), "activate", + GTK_SIGNAL_FUNC (OnEmu_Run), + NULL); + gtk_signal_connect (GTK_OBJECT (reset1), "activate", + GTK_SIGNAL_FUNC (OnEmu_Reset), + NULL); + gtk_signal_connect (GTK_OBJECT (plugins___bios1), "activate", + GTK_SIGNAL_FUNC (OnConf_Conf), + NULL); + gtk_signal_connect (GTK_OBJECT (graphics1), "activate", + GTK_SIGNAL_FUNC (OnConf_Gpu), + NULL); + gtk_signal_connect (GTK_OBJECT (sound1), "activate", + GTK_SIGNAL_FUNC (OnConf_Spu), + NULL); + gtk_signal_connect (GTK_OBJECT (cd_rom1), "activate", + GTK_SIGNAL_FUNC (OnConf_Cdr), + NULL); + gtk_signal_connect (GTK_OBJECT (controllers1), "activate", + GTK_SIGNAL_FUNC (OnConf_Pads), + NULL); + gtk_signal_connect (GTK_OBJECT (cpu1), "activate", + GTK_SIGNAL_FUNC (OnConf_Cpu), + NULL); + gtk_signal_connect (GTK_OBJECT (memory_cards1), "activate", + GTK_SIGNAL_FUNC (OnConf_Mcds), + NULL); + gtk_signal_connect (GTK_OBJECT (debug1), "activate", + GTK_SIGNAL_FUNC (OnDebug), + NULL); + gtk_signal_connect (GTK_OBJECT (about_pcsx1), "activate", + GTK_SIGNAL_FUNC (OnHelp_About), + NULL); + + return MainWindow; +} + +GtkWidget* +create_AboutDlg (void) +{ + GtkWidget *AboutDlg; + GtkWidget *vbox2; + GtkWidget *packer1; + GtkWidget *hbox1; + GtkWidget *vbox4; + GtkWidget *GtkAbout_LabelVersion; + GtkWidget *frame1; + GtkWidget *vbox6; + GtkWidget *GtkAbout_LabelAuthors; + GtkWidget *pixmap1; + GtkWidget *frame2; + GtkWidget *vbox5; + GtkWidget *GtkAbout_LabelGreets; + GtkWidget *hbuttonbox1; + GtkWidget *button1; + + AboutDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_object_set_data (GTK_OBJECT (AboutDlg), "AboutDlg", AboutDlg); + gtk_container_set_border_width (GTK_CONTAINER (AboutDlg), 10); + gtk_window_set_title (GTK_WINDOW (AboutDlg), "Pcsx About"); + gtk_window_set_position (GTK_WINDOW (AboutDlg), GTK_WIN_POS_CENTER); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox2); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox2", vbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox2); + gtk_container_add (GTK_CONTAINER (AboutDlg), vbox2); + + packer1 = gtk_packer_new (); + gtk_widget_ref (packer1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "packer1", packer1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (packer1); + gtk_box_pack_start (GTK_BOX (vbox2), packer1, FALSE, FALSE, 0); + + hbox1 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "hbox1", hbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox1); + gtk_box_pack_start (GTK_BOX (vbox2), hbox1, TRUE, TRUE, 0); + + vbox4 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox4); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox4", vbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox4); + gtk_box_pack_start (GTK_BOX (hbox1), vbox4, TRUE, TRUE, 0); + + GtkAbout_LabelVersion = gtk_label_new ("PCSX\r\r\nVersion x.x"); + gtk_widget_ref (GtkAbout_LabelVersion); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelVersion", GtkAbout_LabelVersion, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkAbout_LabelVersion); + gtk_box_pack_start (GTK_BOX (vbox4), GtkAbout_LabelVersion, FALSE, FALSE, 0); + + frame1 = gtk_frame_new (NULL); + gtk_widget_ref (frame1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "frame1", frame1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame1); + gtk_box_pack_start (GTK_BOX (vbox4), frame1, FALSE, FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame1), 5); + + vbox6 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox6); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox6", vbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox6); + gtk_container_add (GTK_CONTAINER (frame1), vbox6); + gtk_container_set_border_width (GTK_CONTAINER (vbox6), 5); + + GtkAbout_LabelAuthors = gtk_label_new ("written by..."); + gtk_widget_ref (GtkAbout_LabelAuthors); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelAuthors", GtkAbout_LabelAuthors, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkAbout_LabelAuthors); + gtk_box_pack_start (GTK_BOX (vbox6), GtkAbout_LabelAuthors, FALSE, FALSE, 0); + + pixmap1 = create_pixmap (AboutDlg, "pcsxAbout.xpm"); + gtk_widget_ref (pixmap1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "pixmap1", pixmap1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (pixmap1); + gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, TRUE, TRUE, 0); + + frame2 = gtk_frame_new (NULL); + gtk_widget_ref (frame2); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "frame2", frame2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame2); + gtk_box_pack_start (GTK_BOX (vbox2), frame2, FALSE, FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame2), 5); + + vbox5 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox5); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "vbox5", vbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox5); + gtk_container_add (GTK_CONTAINER (frame2), vbox5); + gtk_container_set_border_width (GTK_CONTAINER (vbox5), 5); + + GtkAbout_LabelGreets = gtk_label_new ("greets to..."); + gtk_widget_ref (GtkAbout_LabelGreets); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "GtkAbout_LabelGreets", GtkAbout_LabelGreets, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkAbout_LabelGreets); + gtk_box_pack_start (GTK_BOX (vbox5), GtkAbout_LabelGreets, FALSE, FALSE, 0); + + hbuttonbox1 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "hbuttonbox1", hbuttonbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox1); + gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox1, TRUE, TRUE, 0); + + button1 = gtk_button_new_with_label ("Ok"); + gtk_widget_ref (button1); + gtk_object_set_data_full (GTK_OBJECT (AboutDlg), "button1", button1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button1); + gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1); + GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (button1), "clicked", + GTK_SIGNAL_FUNC (OnHelpAbout_Ok), + NULL); + + return AboutDlg; +} + +GtkWidget* +create_ConfDlg (void) +{ + GtkWidget *ConfDlg; + GtkWidget *vbox12; + GtkWidget *table2; + GtkWidget *GtkCombo_Pad1; + GtkWidget *combo_entry4; + GtkWidget *GtkCombo_Pad2; + GtkWidget *combo_entry5; + GtkWidget *GtkCombo_Cdr; + GtkWidget *combo_entry6; + GtkWidget *GtkCombo_Bios; + GtkWidget *combo_entry7; + GtkWidget *hbuttonbox5; + GtkWidget *button6; + GtkWidget *button7; + GtkWidget *button8; + GtkWidget *hbuttonbox6; + GtkWidget *button9; + GtkWidget *button10; + GtkWidget *button11; + GtkWidget *hbuttonbox7; + GtkWidget *button12; + GtkWidget *button13; + GtkWidget *button14; + GtkWidget *hbuttonbox8; + GtkWidget *button15; + GtkWidget *button16; + GtkWidget *button17; + GtkWidget *hbuttonbox9; + GtkWidget *button18; + GtkWidget *button19; + GtkWidget *button20; + GtkWidget *label2; + GtkWidget *label1; + GtkWidget *label3; + GtkWidget *label5; + GtkWidget *label6; + GtkWidget *label4; + GtkWidget *GtkCombo_Gpu; + GtkWidget *combo_entry2; + GtkWidget *GtkCombo_Spu; + GtkWidget *combo_entry3; + GtkWidget *hbox5; + GtkWidget *hbuttonbox11; + GtkWidget *button22; + GtkWidget *button23; + GtkWidget *hbuttonbox10; + GtkWidget *button4; + GtkWidget *button25; + + ConfDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_object_set_data (GTK_OBJECT (ConfDlg), "ConfDlg", ConfDlg); + gtk_container_set_border_width (GTK_CONTAINER (ConfDlg), 10); + gtk_window_set_title (GTK_WINDOW (ConfDlg), "Conf"); + gtk_window_set_position (GTK_WINDOW (ConfDlg), GTK_WIN_POS_CENTER); + + vbox12 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox12); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "vbox12", vbox12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox12); + gtk_container_add (GTK_CONTAINER (ConfDlg), vbox12); + + table2 = gtk_table_new (9, 2, FALSE); + gtk_widget_ref (table2); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "table2", table2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (table2); + gtk_box_pack_start (GTK_BOX (vbox12), table2, TRUE, TRUE, 0); + gtk_table_set_col_spacings (GTK_TABLE (table2), 15); + + GtkCombo_Pad1 = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Pad1); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Pad1", GtkCombo_Pad1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Pad1); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad1, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry4 = GTK_COMBO (GtkCombo_Pad1)->entry; + gtk_widget_ref (combo_entry4); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry4", combo_entry4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry4); + + GtkCombo_Pad2 = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Pad2); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Pad2", GtkCombo_Pad2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Pad2); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Pad2, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry5 = GTK_COMBO (GtkCombo_Pad2)->entry; + gtk_widget_ref (combo_entry5); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry5", combo_entry5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry5); + + GtkCombo_Cdr = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Cdr); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Cdr", GtkCombo_Cdr, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Cdr); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Cdr, 0, 1, 7, 8, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry6 = GTK_COMBO (GtkCombo_Cdr)->entry; + gtk_widget_ref (combo_entry6); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry6", combo_entry6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry6); + + GtkCombo_Bios = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Bios); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Bios", GtkCombo_Bios, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Bios); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Bios, 1, 2, 7, 8, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry7 = GTK_COMBO (GtkCombo_Bios)->entry; + gtk_widget_ref (combo_entry7); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry7", combo_entry7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry7); + + hbuttonbox5 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox5); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox5", hbuttonbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox5); + gtk_table_attach (GTK_TABLE (table2), hbuttonbox5, 0, 1, 8, 9, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox5), 0); + + button6 = gtk_button_new_with_label ("Configure"); + gtk_widget_ref (button6); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button6", button6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button6); + gtk_container_add (GTK_CONTAINER (hbuttonbox5), button6); + GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT); + + button7 = gtk_button_new_with_label ("Test"); + gtk_widget_ref (button7); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button7", button7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button7); + gtk_container_add (GTK_CONTAINER (hbuttonbox5), button7); + GTK_WIDGET_SET_FLAGS (button7, GTK_CAN_DEFAULT); + + button8 = gtk_button_new_with_label ("About"); + gtk_widget_ref (button8); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button8", button8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button8); + gtk_container_add (GTK_CONTAINER (hbuttonbox5), button8); + GTK_WIDGET_SET_FLAGS (button8, GTK_CAN_DEFAULT); + + hbuttonbox6 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox6); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox6", hbuttonbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox6); + gtk_table_attach (GTK_TABLE (table2), hbuttonbox6, 1, 2, 5, 6, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox6), 0); + + button9 = gtk_button_new_with_label ("Configure"); + gtk_widget_ref (button9); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button9", button9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button9); + gtk_container_add (GTK_CONTAINER (hbuttonbox6), button9); + GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT); + + button10 = gtk_button_new_with_label ("Test"); + gtk_widget_ref (button10); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button10", button10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button10); + gtk_container_add (GTK_CONTAINER (hbuttonbox6), button10); + GTK_WIDGET_SET_FLAGS (button10, GTK_CAN_DEFAULT); + + button11 = gtk_button_new_with_label ("About"); + gtk_widget_ref (button11); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button11", button11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button11); + gtk_container_add (GTK_CONTAINER (hbuttonbox6), button11); + GTK_WIDGET_SET_FLAGS (button11, GTK_CAN_DEFAULT); + + hbuttonbox7 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox7); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox7", hbuttonbox7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox7); + gtk_table_attach (GTK_TABLE (table2), hbuttonbox7, 0, 1, 5, 6, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox7), 0); + + button12 = gtk_button_new_with_label ("Configure"); + gtk_widget_ref (button12); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button12", button12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button12); + gtk_container_add (GTK_CONTAINER (hbuttonbox7), button12); + GTK_WIDGET_SET_FLAGS (button12, GTK_CAN_DEFAULT); + + button13 = gtk_button_new_with_label ("Test"); + gtk_widget_ref (button13); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button13", button13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button13); + gtk_container_add (GTK_CONTAINER (hbuttonbox7), button13); + GTK_WIDGET_SET_FLAGS (button13, GTK_CAN_DEFAULT); + + button14 = gtk_button_new_with_label ("About"); + gtk_widget_ref (button14); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button14", button14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button14); + gtk_container_add (GTK_CONTAINER (hbuttonbox7), button14); + GTK_WIDGET_SET_FLAGS (button14, GTK_CAN_DEFAULT); + + hbuttonbox8 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox8); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox8", hbuttonbox8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox8); + gtk_table_attach (GTK_TABLE (table2), hbuttonbox8, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox8), 0); + + button15 = gtk_button_new_with_label ("Configure"); + gtk_widget_ref (button15); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button15", button15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button15); + gtk_container_add (GTK_CONTAINER (hbuttonbox8), button15); + GTK_WIDGET_SET_FLAGS (button15, GTK_CAN_DEFAULT); + + button16 = gtk_button_new_with_label ("Test"); + gtk_widget_ref (button16); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button16", button16, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button16); + gtk_container_add (GTK_CONTAINER (hbuttonbox8), button16); + GTK_WIDGET_SET_FLAGS (button16, GTK_CAN_DEFAULT); + + button17 = gtk_button_new_with_label ("About"); + gtk_widget_ref (button17); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button17", button17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button17); + gtk_container_add (GTK_CONTAINER (hbuttonbox8), button17); + GTK_WIDGET_SET_FLAGS (button17, GTK_CAN_DEFAULT); + + hbuttonbox9 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox9); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox9", hbuttonbox9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox9); + gtk_table_attach (GTK_TABLE (table2), hbuttonbox9, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_FILL), 0, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox9), 0); + + button18 = gtk_button_new_with_label ("Configure"); + gtk_widget_ref (button18); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button18", button18, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button18); + gtk_container_add (GTK_CONTAINER (hbuttonbox9), button18); + GTK_WIDGET_SET_FLAGS (button18, GTK_CAN_DEFAULT); + + button19 = gtk_button_new_with_label ("Test"); + gtk_widget_ref (button19); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button19", button19, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button19); + gtk_container_add (GTK_CONTAINER (hbuttonbox9), button19); + GTK_WIDGET_SET_FLAGS (button19, GTK_CAN_DEFAULT); + + button20 = gtk_button_new_with_label ("About"); + gtk_widget_ref (button20); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button20", button20, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button20); + gtk_container_add (GTK_CONTAINER (hbuttonbox9), button20); + GTK_WIDGET_SET_FLAGS (button20, GTK_CAN_DEFAULT); + + label2 = gtk_label_new ("Sound"); + gtk_widget_ref (label2); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label2", label2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label2); + gtk_table_attach (GTK_TABLE (table2), label2, 1, 2, 0, 1, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); + + label1 = gtk_label_new ("Graphics"); + gtk_widget_ref (label1); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label1", label1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label1); + gtk_table_attach (GTK_TABLE (table2), label1, 0, 1, 0, 1, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); + + label3 = gtk_label_new ("First Controller"); + gtk_widget_ref (label3); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label3", label3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label3); + gtk_table_attach (GTK_TABLE (table2), label3, 0, 1, 3, 4, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5); + + label5 = gtk_label_new ("Cdrom"); + gtk_widget_ref (label5); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label5", label5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label5); + gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 6, 7, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5); + + label6 = gtk_label_new ("Bios"); + gtk_widget_ref (label6); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label6", label6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label6); + gtk_table_attach (GTK_TABLE (table2), label6, 1, 2, 6, 7, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5); + + label4 = gtk_label_new ("Second Controller"); + gtk_widget_ref (label4); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "label4", label4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label4); + gtk_table_attach (GTK_TABLE (table2), label4, 1, 2, 3, 4, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5); + + GtkCombo_Gpu = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Gpu); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Gpu", GtkCombo_Gpu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Gpu); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Gpu, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry2 = GTK_COMBO (GtkCombo_Gpu)->entry; + gtk_widget_ref (combo_entry2); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry2", combo_entry2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry2); + + GtkCombo_Spu = gtk_combo_new (); + gtk_widget_ref (GtkCombo_Spu); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "GtkCombo_Spu", GtkCombo_Spu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_Spu); + gtk_table_attach (GTK_TABLE (table2), GtkCombo_Spu, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + combo_entry3 = GTK_COMBO (GtkCombo_Spu)->entry; + gtk_widget_ref (combo_entry3); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "combo_entry3", combo_entry3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry3); + + hbox5 = gtk_hbox_new (FALSE, 14); + gtk_widget_ref (hbox5); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbox5", hbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox5); + gtk_box_pack_start (GTK_BOX (vbox12), hbox5, TRUE, TRUE, 0); + + hbuttonbox11 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox11); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox11", hbuttonbox11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox11); + gtk_box_pack_start (GTK_BOX (hbox5), hbuttonbox11, TRUE, TRUE, 0); + gtk_widget_set_usize (hbuttonbox11, 169, -2); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox11), 0); + + button22 = gtk_button_new_with_label ("Select Plugins Dir"); + gtk_widget_ref (button22); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button22", button22, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button22); + gtk_container_add (GTK_CONTAINER (hbuttonbox11), button22); + gtk_widget_set_usize (button22, 109, -2); + GTK_WIDGET_SET_FLAGS (button22, GTK_CAN_DEFAULT); + + button23 = gtk_button_new_with_label ("Select Bios Dir"); + gtk_widget_ref (button23); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button23", button23, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button23); + gtk_container_add (GTK_CONTAINER (hbuttonbox11), button23); + GTK_WIDGET_SET_FLAGS (button23, GTK_CAN_DEFAULT); + + hbuttonbox10 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox10); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "hbuttonbox10", hbuttonbox10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox10); + gtk_box_pack_start (GTK_BOX (hbox5), hbuttonbox10, TRUE, TRUE, 0); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox10), 0); + + button4 = gtk_button_new_with_label ("Ok"); + gtk_widget_ref (button4); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button4", button4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button4); + gtk_container_add (GTK_CONTAINER (hbuttonbox10), button4); + GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT); + + button25 = gtk_button_new_with_label ("Cancel"); + gtk_widget_ref (button25); + gtk_object_set_data_full (GTK_OBJECT (ConfDlg), "button25", button25, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button25); + gtk_container_add (GTK_CONTAINER (hbuttonbox10), button25); + GTK_WIDGET_SET_FLAGS (button25, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (button6), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_CdrConf), + NULL); + gtk_signal_connect (GTK_OBJECT (button7), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_CdrTest), + NULL); + gtk_signal_connect (GTK_OBJECT (button8), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_CdrAbout), + NULL); + gtk_signal_connect (GTK_OBJECT (button9), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad2Conf), + NULL); + gtk_signal_connect (GTK_OBJECT (button10), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad2Test), + NULL); + gtk_signal_connect (GTK_OBJECT (button11), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad2About), + NULL); + gtk_signal_connect (GTK_OBJECT (button12), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad1Conf), + NULL); + gtk_signal_connect (GTK_OBJECT (button13), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad1Test), + NULL); + gtk_signal_connect (GTK_OBJECT (button14), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Pad1About), + NULL); + gtk_signal_connect (GTK_OBJECT (button15), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_GpuConf), + NULL); + gtk_signal_connect (GTK_OBJECT (button16), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_GpuTest), + NULL); + gtk_signal_connect (GTK_OBJECT (button17), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_GpuAbout), + NULL); + gtk_signal_connect (GTK_OBJECT (button18), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_SpuConf), + NULL); + gtk_signal_connect (GTK_OBJECT (button19), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_SpuTest), + NULL); + gtk_signal_connect (GTK_OBJECT (button20), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_SpuAbout), + NULL); + gtk_signal_connect (GTK_OBJECT (button22), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_PluginsPath), + NULL); + gtk_signal_connect (GTK_OBJECT (button23), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_BiosPath), + NULL); + gtk_signal_connect (GTK_OBJECT (button4), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Ok), + NULL); + gtk_signal_connect (GTK_OBJECT (button25), "clicked", + GTK_SIGNAL_FUNC (OnConfConf_Cancel), + NULL); + + return ConfDlg; +} + +GtkWidget* +create_CpuDlg (void) +{ + GtkWidget *CpuDlg; + GtkWidget *vbox8; + GtkWidget *frame3; + GtkWidget *vbox15; + GtkWidget *table1; + GtkWidget *GtkCheckButton_Xa; + GtkWidget *GtkCheckButton_Cdda; + GtkWidget *GtkCheckButton_Sio; + GtkWidget *GtkCheckButton_Cpu; + GtkWidget *GtkCheckButton_PsxOut; + GtkWidget *GtkCheckButton_Mdec; + GtkWidget *GtkCheckButton_SpuIrq; + GtkWidget *GtkCheckButton_CpuLog; + GtkWidget *GtkCheckButton_CdTiming; + GtkWidget *frame6; + GtkWidget *hbox4; + GtkWidget *GtkCheckButton_PsxAuto; + GtkWidget *GtkCombo_PsxType; + GtkWidget *combo_entry1; + GtkWidget *hbuttonbox3; + GtkWidget *button2; + GtkWidget *button3; + + CpuDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_object_set_data (GTK_OBJECT (CpuDlg), "CpuDlg", CpuDlg); + gtk_container_set_border_width (GTK_CONTAINER (CpuDlg), 5); + gtk_window_set_title (GTK_WINDOW (CpuDlg), "Cpu"); + gtk_window_set_position (GTK_WINDOW (CpuDlg), GTK_WIN_POS_CENTER); + + vbox8 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox8); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "vbox8", vbox8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox8); + gtk_container_add (GTK_CONTAINER (CpuDlg), vbox8); + + frame3 = gtk_frame_new ("Options"); + gtk_widget_ref (frame3); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "frame3", frame3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame3); + gtk_box_pack_start (GTK_BOX (vbox8), frame3, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame3), 5); + + vbox15 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox15); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "vbox15", vbox15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox15); + gtk_container_add (GTK_CONTAINER (frame3), vbox15); + gtk_container_set_border_width (GTK_CONTAINER (vbox15), 5); + + table1 = gtk_table_new (4, 2, FALSE); + gtk_widget_ref (table1); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "table1", table1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (table1); + gtk_box_pack_start (GTK_BOX (vbox15), table1, TRUE, TRUE, 0); + + GtkCheckButton_Xa = gtk_check_button_new_with_label ("Disable Xa Decoding"); + gtk_widget_ref (GtkCheckButton_Xa); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Xa", GtkCheckButton_Xa, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_Xa); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Xa, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_Cdda = gtk_check_button_new_with_label ("Disable Cd Audio"); + gtk_widget_ref (GtkCheckButton_Cdda); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Cdda", GtkCheckButton_Cdda, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_Cdda); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Cdda, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_Sio = gtk_check_button_new_with_label ("Sio Irq Always Enabled"); + gtk_widget_ref (GtkCheckButton_Sio); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Sio", GtkCheckButton_Sio, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_Sio); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Sio, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_Cpu = gtk_check_button_new_with_label ("Enable Interpreter Cpu"); + gtk_widget_ref (GtkCheckButton_Cpu); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Cpu", GtkCheckButton_Cpu, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_Cpu); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Cpu, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_PsxOut = gtk_check_button_new_with_label ("Enable Console Output"); + gtk_widget_ref (GtkCheckButton_PsxOut); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_PsxOut", GtkCheckButton_PsxOut, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_PsxOut); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_PsxOut, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_Mdec = gtk_check_button_new_with_label ("Black & White Movies"); + gtk_widget_ref (GtkCheckButton_Mdec); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_Mdec", GtkCheckButton_Mdec, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_Mdec); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_Mdec, 0, 1, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_SpuIrq = gtk_check_button_new_with_label ("Spu Irq Always Enabled"); + gtk_widget_ref (GtkCheckButton_SpuIrq); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_SpuIrq", GtkCheckButton_SpuIrq, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_SpuIrq); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_SpuIrq, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_CpuLog = gtk_check_button_new_with_label ("Enable CPU Log"); + gtk_widget_ref (GtkCheckButton_CpuLog); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_CpuLog", GtkCheckButton_CpuLog, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_CpuLog); + gtk_table_attach (GTK_TABLE (table1), GtkCheckButton_CpuLog, 1, 2, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + GtkCheckButton_CdTiming = gtk_check_button_new_with_label ("Old Cdrom Timing (Gran Turismo...)"); + gtk_widget_ref (GtkCheckButton_CdTiming); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_CdTiming", GtkCheckButton_CdTiming, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_CdTiming); + gtk_box_pack_start (GTK_BOX (vbox15), GtkCheckButton_CdTiming, FALSE, FALSE, 0); + + frame6 = gtk_frame_new ("Psx System Type"); + gtk_widget_ref (frame6); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "frame6", frame6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame6); + gtk_box_pack_start (GTK_BOX (vbox8), frame6, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame6), 5); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox4); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "hbox4", hbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox4); + gtk_container_add (GTK_CONTAINER (frame6), hbox4); + gtk_container_set_border_width (GTK_CONTAINER (hbox4), 5); + + GtkCheckButton_PsxAuto = gtk_check_button_new_with_label ("Autodetect"); + gtk_widget_ref (GtkCheckButton_PsxAuto); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCheckButton_PsxAuto", GtkCheckButton_PsxAuto, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCheckButton_PsxAuto); + gtk_box_pack_start (GTK_BOX (hbox4), GtkCheckButton_PsxAuto, FALSE, FALSE, 0); + gtk_widget_set_usize (GtkCheckButton_PsxAuto, 159, -2); + + GtkCombo_PsxType = gtk_combo_new (); + gtk_widget_ref (GtkCombo_PsxType); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "GtkCombo_PsxType", GtkCombo_PsxType, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCombo_PsxType); + gtk_box_pack_start (GTK_BOX (hbox4), GtkCombo_PsxType, FALSE, FALSE, 0); + gtk_widget_set_usize (GtkCombo_PsxType, 154, -2); + + combo_entry1 = GTK_COMBO (GtkCombo_PsxType)->entry; + gtk_widget_ref (combo_entry1); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "combo_entry1", combo_entry1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (combo_entry1); + gtk_entry_set_editable (GTK_ENTRY (combo_entry1), FALSE); + + hbuttonbox3 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox3); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "hbuttonbox3", hbuttonbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox3); + gtk_box_pack_start (GTK_BOX (vbox8), hbuttonbox3, TRUE, TRUE, 0); + + button2 = gtk_button_new_with_label ("Ok"); + gtk_widget_ref (button2); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "button2", button2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button2); + gtk_container_add (GTK_CONTAINER (hbuttonbox3), button2); + GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT); + + button3 = gtk_button_new_with_label ("Cancel"); + gtk_widget_ref (button3); + gtk_object_set_data_full (GTK_OBJECT (CpuDlg), "button3", button3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button3); + gtk_container_add (GTK_CONTAINER (hbuttonbox3), button3); + GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (button2), "clicked", + GTK_SIGNAL_FUNC (OnCpu_Ok), + NULL); + gtk_signal_connect (GTK_OBJECT (button3), "clicked", + GTK_SIGNAL_FUNC (OnCpu_Cancel), + NULL); + + return CpuDlg; +} + +GtkWidget* +create_McdsDlg (void) +{ + GtkWidget *McdsDlg; + GtkWidget *vbox10; + GtkWidget *hbox6; + GtkWidget *frame7; + GtkWidget *vbox13; + GtkWidget *scrolledwindow1; + GtkWidget *GtkCList_McdList1; + GtkWidget *label9; + GtkWidget *label10; + GtkWidget *label11; + GtkWidget *label15; + GtkWidget *label16; + GtkWidget *hbuttonbox12; + GtkWidget *GtkButton_SelMcd1; + GtkWidget *GtkButton_Format1; + GtkWidget *GtkButton_Reload1; + GtkWidget *GtkEntry_Mcd1; + GtkWidget *vbuttonbox1; + GtkWidget *button26; + GtkWidget *button28; + GtkWidget *GtkButton_McdPaste; + GtkWidget *button29; + GtkWidget *button30; + GtkWidget *frame8; + GtkWidget *vbox14; + GtkWidget *scrolledwindow2; + GtkWidget *GtkCList_McdList2; + GtkWidget *label12; + GtkWidget *label13; + GtkWidget *label14; + GtkWidget *label17; + GtkWidget *label18; + GtkWidget *hbuttonbox13; + GtkWidget *GtkButton_SelMcd2; + GtkWidget *GtkButton_Format2; + GtkWidget *GtkButton_Reload2; + GtkWidget *GtkEntry_Mcd2; + GtkWidget *hbuttonbox2; + GtkWidget *GtkMcds_Ok; + GtkWidget *GtkMcds_Cancel; + + McdsDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_object_set_data (GTK_OBJECT (McdsDlg), "McdsDlg", McdsDlg); + gtk_container_set_border_width (GTK_CONTAINER (McdsDlg), 5); + gtk_window_set_title (GTK_WINDOW (McdsDlg), "Mcds"); + gtk_window_set_position (GTK_WINDOW (McdsDlg), GTK_WIN_POS_CENTER); + + vbox10 = gtk_vbox_new (FALSE, 5); + gtk_widget_ref (vbox10); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox10", vbox10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox10); + gtk_container_add (GTK_CONTAINER (McdsDlg), vbox10); + + hbox6 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox6); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbox6", hbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox6); + gtk_box_pack_start (GTK_BOX (vbox10), hbox6, TRUE, TRUE, 0); + + frame7 = gtk_frame_new ("Memory Card 1"); + gtk_widget_ref (frame7); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "frame7", frame7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame7); + gtk_box_pack_start (GTK_BOX (hbox6), frame7, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame7), 5); + + vbox13 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox13); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox13", vbox13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox13); + gtk_container_add (GTK_CONTAINER (frame7), vbox13); + gtk_container_set_border_width (GTK_CONTAINER (vbox13), 5); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "scrolledwindow1", scrolledwindow1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start (GTK_BOX (vbox13), scrolledwindow1, TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + GtkCList_McdList1 = gtk_clist_new (5); + gtk_widget_ref (GtkCList_McdList1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkCList_McdList1", GtkCList_McdList1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCList_McdList1); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), GtkCList_McdList1); + gtk_widget_set_usize (GtkCList_McdList1, -2, 180); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 0, 25); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 1, 180); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 2, 50); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 3, 80); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList1), 4, 80); + gtk_clist_column_titles_show (GTK_CLIST (GtkCList_McdList1)); + + label9 = gtk_label_new ("Icon"); + gtk_widget_ref (label9); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label9", label9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label9); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 0, label9); + + label10 = gtk_label_new ("Title"); + gtk_widget_ref (label10); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label10", label10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label10); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 1, label10); + + label11 = gtk_label_new ("Status"); + gtk_widget_ref (label11); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label11", label11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label11); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 2, label11); + + label15 = gtk_label_new ("Game ID"); + gtk_widget_ref (label15); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label15", label15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label15); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 3, label15); + + label16 = gtk_label_new ("Game"); + gtk_widget_ref (label16); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label16", label16, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label16); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList1), 4, label16); + + hbuttonbox12 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox12); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox12", hbuttonbox12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox12); + gtk_box_pack_start (GTK_BOX (vbox13), hbuttonbox12, TRUE, TRUE, 0); + gtk_widget_set_usize (hbuttonbox12, 240, -2); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox12), 0); + gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox12), 70, 27); + + GtkButton_SelMcd1 = gtk_button_new_with_label ("Select"); + gtk_widget_ref (GtkButton_SelMcd1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_SelMcd1", GtkButton_SelMcd1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_SelMcd1); + gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_SelMcd1); + GTK_WIDGET_SET_FLAGS (GtkButton_SelMcd1, GTK_CAN_DEFAULT); + + GtkButton_Format1 = gtk_button_new_with_label ("Format"); + gtk_widget_ref (GtkButton_Format1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Format1", GtkButton_Format1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_Format1); + gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_Format1); + GTK_WIDGET_SET_FLAGS (GtkButton_Format1, GTK_CAN_DEFAULT); + + GtkButton_Reload1 = gtk_button_new_with_label ("Reload"); + gtk_widget_ref (GtkButton_Reload1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Reload1", GtkButton_Reload1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_Reload1); + gtk_container_add (GTK_CONTAINER (hbuttonbox12), GtkButton_Reload1); + GTK_WIDGET_SET_FLAGS (GtkButton_Reload1, GTK_CAN_DEFAULT); + + GtkEntry_Mcd1 = gtk_entry_new (); + gtk_widget_ref (GtkEntry_Mcd1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkEntry_Mcd1", GtkEntry_Mcd1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkEntry_Mcd1); + gtk_box_pack_start (GTK_BOX (vbox13), GtkEntry_Mcd1, FALSE, FALSE, 0); + + vbuttonbox1 = gtk_vbutton_box_new (); + gtk_widget_ref (vbuttonbox1); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbuttonbox1", vbuttonbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbuttonbox1); + gtk_box_pack_start (GTK_BOX (hbox6), vbuttonbox1, TRUE, FALSE, 0); + gtk_button_box_set_layout (GTK_BUTTON_BOX (vbuttonbox1), GTK_BUTTONBOX_SPREAD); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (vbuttonbox1), 0); + gtk_button_box_set_child_size (GTK_BUTTON_BOX (vbuttonbox1), 64, 27); + gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (vbuttonbox1), 0, 0); + + button26 = gtk_button_new_with_label ("-> Copy ->"); + gtk_widget_ref (button26); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button26", button26, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button26); + gtk_container_add (GTK_CONTAINER (vbuttonbox1), button26); + GTK_WIDGET_SET_FLAGS (button26, GTK_CAN_DEFAULT); + + button28 = gtk_button_new_with_label ("<- Copy <-"); + gtk_widget_ref (button28); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button28", button28, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button28); + gtk_container_add (GTK_CONTAINER (vbuttonbox1), button28); + GTK_WIDGET_SET_FLAGS (button28, GTK_CAN_DEFAULT); + + GtkButton_McdPaste = gtk_button_new_with_label ("Paste"); + gtk_widget_ref (GtkButton_McdPaste); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_McdPaste", GtkButton_McdPaste, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_McdPaste); + gtk_container_add (GTK_CONTAINER (vbuttonbox1), GtkButton_McdPaste); + GTK_WIDGET_SET_FLAGS (GtkButton_McdPaste, GTK_CAN_DEFAULT); + + button29 = gtk_button_new_with_label ("Un/Delete ->"); + gtk_widget_ref (button29); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button29", button29, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button29); + gtk_container_add (GTK_CONTAINER (vbuttonbox1), button29); + GTK_WIDGET_SET_FLAGS (button29, GTK_CAN_DEFAULT); + + button30 = gtk_button_new_with_label ("<- Un/Delete"); + gtk_widget_ref (button30); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "button30", button30, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (button30); + gtk_container_add (GTK_CONTAINER (vbuttonbox1), button30); + GTK_WIDGET_SET_FLAGS (button30, GTK_CAN_DEFAULT); + + frame8 = gtk_frame_new ("Memory Card 2"); + gtk_widget_ref (frame8); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "frame8", frame8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame8); + gtk_box_pack_start (GTK_BOX (hbox6), frame8, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (frame8), 5); + + vbox14 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox14); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "vbox14", vbox14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox14); + gtk_container_add (GTK_CONTAINER (frame8), vbox14); + gtk_container_set_border_width (GTK_CONTAINER (vbox14), 5); + + scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "scrolledwindow2", scrolledwindow2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow2); + gtk_box_pack_start (GTK_BOX (vbox14), scrolledwindow2, TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + GtkCList_McdList2 = gtk_clist_new (5); + gtk_widget_ref (GtkCList_McdList2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkCList_McdList2", GtkCList_McdList2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkCList_McdList2); + gtk_container_add (GTK_CONTAINER (scrolledwindow2), GtkCList_McdList2); + gtk_widget_set_usize (GtkCList_McdList2, -2, 180); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 0, 25); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 1, 180); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 2, 50); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 3, 80); + gtk_clist_set_column_width (GTK_CLIST (GtkCList_McdList2), 4, 80); + gtk_clist_column_titles_show (GTK_CLIST (GtkCList_McdList2)); + + label12 = gtk_label_new ("Icon"); + gtk_widget_ref (label12); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label12", label12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label12); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 0, label12); + + label13 = gtk_label_new ("Title"); + gtk_widget_ref (label13); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label13", label13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label13); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 1, label13); + + label14 = gtk_label_new ("Status"); + gtk_widget_ref (label14); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label14", label14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label14); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 2, label14); + + label17 = gtk_label_new ("Game ID"); + gtk_widget_ref (label17); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label17", label17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label17); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 3, label17); + + label18 = gtk_label_new ("Game"); + gtk_widget_ref (label18); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "label18", label18, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label18); + gtk_clist_set_column_widget (GTK_CLIST (GtkCList_McdList2), 4, label18); + + hbuttonbox13 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox13); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox13", hbuttonbox13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox13); + gtk_box_pack_start (GTK_BOX (vbox14), hbuttonbox13, TRUE, TRUE, 0); + gtk_widget_set_usize (hbuttonbox13, 240, -2); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox13), 0); + gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox13), 70, 27); + + GtkButton_SelMcd2 = gtk_button_new_with_label ("Select"); + gtk_widget_ref (GtkButton_SelMcd2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_SelMcd2", GtkButton_SelMcd2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_SelMcd2); + gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_SelMcd2); + GTK_WIDGET_SET_FLAGS (GtkButton_SelMcd2, GTK_CAN_DEFAULT); + + GtkButton_Format2 = gtk_button_new_with_label ("Format"); + gtk_widget_ref (GtkButton_Format2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Format2", GtkButton_Format2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_Format2); + gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_Format2); + GTK_WIDGET_SET_FLAGS (GtkButton_Format2, GTK_CAN_DEFAULT); + + GtkButton_Reload2 = gtk_button_new_with_label ("Reload"); + gtk_widget_ref (GtkButton_Reload2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkButton_Reload2", GtkButton_Reload2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_Reload2); + gtk_container_add (GTK_CONTAINER (hbuttonbox13), GtkButton_Reload2); + GTK_WIDGET_SET_FLAGS (GtkButton_Reload2, GTK_CAN_DEFAULT); + + GtkEntry_Mcd2 = gtk_entry_new (); + gtk_widget_ref (GtkEntry_Mcd2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkEntry_Mcd2", GtkEntry_Mcd2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkEntry_Mcd2); + gtk_box_pack_start (GTK_BOX (vbox14), GtkEntry_Mcd2, FALSE, FALSE, 0); + + hbuttonbox2 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox2); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "hbuttonbox2", hbuttonbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox2); + gtk_box_pack_start (GTK_BOX (vbox10), hbuttonbox2, TRUE, TRUE, 0); + + GtkMcds_Ok = gtk_button_new_with_label ("Ok"); + gtk_widget_ref (GtkMcds_Ok); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkMcds_Ok", GtkMcds_Ok, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkMcds_Ok); + gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkMcds_Ok); + GTK_WIDGET_SET_FLAGS (GtkMcds_Ok, GTK_CAN_DEFAULT); + + GtkMcds_Cancel = gtk_button_new_with_label ("Cancel"); + gtk_widget_ref (GtkMcds_Cancel); + gtk_object_set_data_full (GTK_OBJECT (McdsDlg), "GtkMcds_Cancel", GtkMcds_Cancel, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkMcds_Cancel); + gtk_container_add (GTK_CONTAINER (hbuttonbox2), GtkMcds_Cancel); + GTK_WIDGET_SET_FLAGS (GtkMcds_Cancel, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (GtkButton_SelMcd1), "clicked", + GTK_SIGNAL_FUNC (OnMcd_FS1), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_Format1), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Format1), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_Reload1), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Reload1), + NULL); + gtk_signal_connect (GTK_OBJECT (button26), "clicked", + GTK_SIGNAL_FUNC (OnMcd_CopyTo2), + NULL); + gtk_signal_connect (GTK_OBJECT (button28), "clicked", + GTK_SIGNAL_FUNC (OnMcd_CopyTo1), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_McdPaste), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Paste), + NULL); + gtk_signal_connect (GTK_OBJECT (button29), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Delete2), + NULL); + gtk_signal_connect (GTK_OBJECT (button30), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Delete1), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_SelMcd2), "clicked", + GTK_SIGNAL_FUNC (OnMcd_FS2), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_Format2), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Format2), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkButton_Reload2), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Reload2), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkMcds_Ok), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Ok), + NULL); + gtk_signal_connect (GTK_OBJECT (GtkMcds_Cancel), "clicked", + GTK_SIGNAL_FUNC (OnMcd_Cancel), + NULL); + + return McdsDlg; +} + +GtkWidget* +create_DebugDlg (void) +{ + GtkWidget *DebugDlg; + GtkWidget *vbox17; + GtkWidget *scrolledwindow3; + GtkWidget *text1; + GtkWidget *hbuttonbox14; + GtkWidget *GtkButton_DbgOk; + + DebugDlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (DebugDlg), "DebugDlg", DebugDlg); + gtk_container_set_border_width (GTK_CONTAINER (DebugDlg), 5); + gtk_window_set_title (GTK_WINDOW (DebugDlg), "Debug"); + + vbox17 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox17); + gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "vbox17", vbox17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox17); + gtk_container_add (GTK_CONTAINER (DebugDlg), vbox17); + + scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow3); + gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "scrolledwindow3", scrolledwindow3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow3); + gtk_box_pack_start (GTK_BOX (vbox17), scrolledwindow3, TRUE, TRUE, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + text1 = gtk_text_new (NULL, NULL); + gtk_widget_ref (text1); + gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "text1", text1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (text1); + gtk_container_add (GTK_CONTAINER (scrolledwindow3), text1); + gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL, + "Test", 4); + + hbuttonbox14 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox14); + gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "hbuttonbox14", hbuttonbox14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox14); + gtk_box_pack_start (GTK_BOX (vbox17), hbuttonbox14, TRUE, TRUE, 0); + + GtkButton_DbgOk = gtk_button_new_with_label ("Ok"); + gtk_widget_ref (GtkButton_DbgOk); + gtk_object_set_data_full (GTK_OBJECT (DebugDlg), "GtkButton_DbgOk", GtkButton_DbgOk, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (GtkButton_DbgOk); + gtk_container_add (GTK_CONTAINER (hbuttonbox14), GtkButton_DbgOk); + GTK_WIDGET_SET_FLAGS (GtkButton_DbgOk, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (GtkButton_DbgOk), "clicked", + GTK_SIGNAL_FUNC (OnDebug_Ok), + NULL); + + return DebugDlg; +} + diff --git a/PcsxSrc/Linux/GladeGui.h b/PcsxSrc/Linux/GladeGui.h index ca46235..ff8d9f9 100644 --- a/PcsxSrc/Linux/GladeGui.h +++ b/PcsxSrc/Linux/GladeGui.h @@ -1,10 +1,10 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -GtkWidget* create_MainWindow (void); -GtkWidget* create_AboutDlg (void); -GtkWidget* create_ConfDlg (void); -GtkWidget* create_CpuDlg (void); -GtkWidget* create_McdsDlg (void); -GtkWidget* create_DebugDlg (void); +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_MainWindow (void); +GtkWidget* create_AboutDlg (void); +GtkWidget* create_ConfDlg (void); +GtkWidget* create_CpuDlg (void); +GtkWidget* create_McdsDlg (void); +GtkWidget* create_DebugDlg (void); diff --git a/PcsxSrc/Linux/GtkGui.c b/PcsxSrc/Linux/GtkGui.c index 7ac46d4..6df431d 100644 --- a/PcsxSrc/Linux/GtkGui.c +++ b/PcsxSrc/Linux/GtkGui.c @@ -1,1326 +1,1326 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Linux.h" -#include "plugins.h" -#include "Sio.h" -#include "GladeGui.h" -#include "GladeFuncs.h" - -extern int UseGui; -long LoadCdBios; -static int needreset = 1; - -PSEgetLibType PSE_getLibType = NULL; -PSEgetLibVersion PSE_getLibVersion = NULL; -PSEgetLibName PSE_getLibName = NULL; - -// Helper Functions -void FindPlugins(); - -// Functions Callbacks -void OnFile_RunExe(); -void OnFile_RunCd(); -void OnFile_RunCdBios(); -void OnFile_Exit(); -void OnEmu_Run(); -void OnEmu_Reset(); -void OnConf_Gpu(); -void OnConf_Spu(); -void OnConf_Cdr(); -void OnConf_Pads(); -void OnConf_Mcds(); -void OnConf_Cpu(); -void OnConf_Conf(); -void OnHelp_Help(); -void OnHelp_About(); - -GtkWidget *Window = NULL; -GtkWidget *ConfDlg; -GtkWidget *DebugDlg; -GtkWidget *AboutDlg; -GtkWidget *FileSel; - -GtkAccelGroup *AccelGroup; - -typedef struct { - GtkWidget *Combo; - GList *glist; - char plist[255][255]; - int plugins; -} PluginConf; - -PluginConf GpuConfS; -PluginConf SpuConfS; -PluginConf CdrConfS; -PluginConf Pad1ConfS; -PluginConf Pad2ConfS; -PluginConf BiosConfS; - -void StartGui() { - Window = create_MainWindow(); - gtk_window_set_title(GTK_WINDOW(Window), "P©SX"); - - gtk_widget_show_all(Window); - gtk_main(); -} - -void RunGui() { - StartGui(); -} - -int destroy=0; - -void OnDestroy() { - if (!destroy) OnFile_Exit(); -} - -void ConfigurePlugins() { - if (!UseGui) return; - OnConf_Conf(); -} - -void ConfigureMemcards() { - OnConf_Mcds(); -} - -void OnRunExe_Ok() { - gchar *File; - char exe[256]; - - File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - strcpy(exe, File); - gtk_widget_destroy(FileSel); - destroy=1; - gtk_widget_destroy(Window); - destroy=0; - gtk_main_quit(); - while (gtk_events_pending()) gtk_main_iteration(); - OpenPlugins(); - SysReset(); - needreset = 0; - Load(exe); - psxCpu->Execute(); -} - -void OnRunExe_Cancel() { - gtk_widget_destroy(FileSel); -} - -void OnFile_RunExe() { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new("Select Psx Exe File"); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnRunExe_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnRunExe_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -void OnFile_RunCd() { - LoadCdBios = 0; - destroy=1; - gtk_widget_destroy(Window); - destroy=0; - gtk_main_quit(); - while (gtk_events_pending()) gtk_main_iteration(); - OpenPlugins(); - SysReset(); - needreset = 0; - CheckCdrom(); - if (LoadCdrom() == -1) { - ClosePlugins(); - SysMessage("Could not load Cdrom\n"); - return; - } - psxCpu->Execute(); -} - -void OnFile_RunCdBios() { - LoadCdBios = 1; - destroy=1; - gtk_widget_destroy(Window); - destroy=0; - gtk_main_quit(); - while (gtk_events_pending()) gtk_main_iteration(); - OpenPlugins(); - SysReset(); - needreset = 0; - CheckCdrom(); - psxCpu->Execute(); -} - -void OnFile_Exit() { - DIR *dir; - struct dirent *ent; - void *Handle; - char plugin[256]; - - // with this the problem with plugins that are linked with the pthread - // library is solved - - dir = opendir(Config.PluginsDir); - if (dir != NULL) { - while ((ent = readdir(dir)) != NULL) { - sprintf (plugin, "%s%s", Config.PluginsDir, ent->d_name); - - if (strstr(plugin, ".so") == NULL) continue; - Handle = dlopen(plugin, RTLD_NOW); - if (Handle == NULL) continue; - } - } - - printf ("P©SX Quitting\n"); - if (UseGui) gtk_main_quit(); - SysClose(); - if (UseGui) gtk_exit(0); - else exit(0); -} - -void OnEmu_Run() { - destroy=1; - gtk_widget_destroy(Window); - destroy=0; - gtk_main_quit(); - while (gtk_events_pending()) gtk_main_iteration(); - OpenPlugins(); - if (needreset) { SysReset(); needreset = 0; } - psxCpu->Execute(); -} - -void OnEmu_Reset() { - needreset = 1; -} - -void OnConf_Gpu() { - gtk_widget_set_sensitive(Window, FALSE); - GPU_configure(); - gtk_widget_set_sensitive(Window, TRUE); -} - -void OnConf_Spu() { - gtk_widget_set_sensitive(Window, FALSE); - SPU_configure(); - gtk_widget_set_sensitive(Window, TRUE); -} - -void OnConf_Cdr() { - gtk_widget_set_sensitive(Window, FALSE); - CDR_configure(); - gtk_widget_set_sensitive(Window, TRUE); -} - -void OnConf_Pads() { - gtk_widget_set_sensitive(Window, FALSE); - PAD1_configure(); - if (strcmp(Config.Pad1, Config.Pad2)) PAD2_configure(); - gtk_widget_set_sensitive(Window, TRUE); -} - -GtkWidget *McdDlg; -GtkWidget *Entry1,*Entry2; -GtkWidget *List1,*List2; -GtkWidget *BtnPaste; -GTimer *Gtimer; -int timer; -McdBlock Blocks[2][15]; -int IconC[2][15]; - -void SetIcon(short *icon, GtkWidget *List, int i) { - GdkPixmap *pixmap; - GdkImage *image; - GdkVisual *visual; - GdkGC *gc; - int x, y, c; - - visual = gdk_window_get_visual(McdDlg->window); - - if (visual->depth == 8) return; - - image = gdk_image_new(GDK_IMAGE_NORMAL, visual, 16, 16); - - for (y=0; y<16; y++) { - for (x=0; x<16; x++) { - c = icon[y*16+x]; - c = ((c&0x001f) << 10) | ((c&0x7c00) >> 10) | (c&0x03e0); - if (visual->depth == 16) - c = (c&0x001f) | ((c&0x7c00) << 1) | ((c&0x03e0) << 1); - else if (visual->depth == 24 || visual->depth == 32) - c = ((c&0x001f) << 3) | ((c&0x03e0) << 6) | ((c&0x7c00) << 9); - - gdk_image_put_pixel(image, x, y, c); - } - } - - pixmap = gdk_pixmap_new(McdDlg->window, 16, 16, visual->depth); - - gc = gdk_gc_new(pixmap); - gdk_draw_image(pixmap, gc, image, 0, 0, 0, 0, 16, 16); - gdk_gc_destroy(gc); - gdk_image_destroy(image); - - gtk_clist_set_pixmap(GTK_CLIST(List), i-1, 0, pixmap, NULL); -} - -void LoadListItems(int mcd, GtkWidget *List) { - int i; - - gtk_clist_clear(GTK_CLIST(List)); - - for (i=1; i<16; i++) { - McdBlock *Info; - gchar *text[5]; - - Info = &Blocks[mcd-1][i-1]; - IconC[mcd-1][i-1] = 0; - - if ((Info->Flags & 0xF0) == 0xA0) { - if ((Info->Flags & 0xF) >= 1 && - (Info->Flags & 0xF) <= 3) { - text[2] = "Deleted"; - } else text[2] = "Free"; - } else if ((Info->Flags & 0xF0) == 0x50) - text[2] = "Used"; - else { text[2] = "Free"; } - - text[0] = ""; - text[1] = Info->Title; - text[3] = Info->ID; - text[4] = Info->Name; - - gtk_clist_insert(GTK_CLIST(List), i-1, text); - - if (Info->IconCount == 0) continue; - - SetIcon(Info->Icon, List, i); - } -} - -void UpdateListItems(int mcd, GtkWidget *List) { - int i,j; - - for (i=1; i<16; i++) { - McdBlock *Info; - gchar *text[5]; - - Info = &Blocks[mcd-1][i-1]; - IconC[mcd-1][i-1] = 0; - - if ((Info->Flags & 0xF0) == 0xA0) { - if ((Info->Flags & 0xF) >= 1 && - (Info->Flags & 0xF) <= 3) { - text[2] = "Deleted"; - } else text[2] = "Free"; - } else if ((Info->Flags & 0xF0) == 0x50) - text[2] = "Used"; - else { text[2] = "Free"; } - - text[0] = ""; - text[1] = Info->Title; - text[3] = Info->ID; - text[4] = Info->Name; - - for (j=0; j<5; j++) - gtk_clist_set_text(GTK_CLIST(List), i-1, j, text[j]); - - if (Info->IconCount == 0) continue; - - SetIcon(Info->Icon, List, i); - } -} - -void LoadMcdDlg() { - int i; - - for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); - for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); - LoadListItems(1, List1); - LoadListItems(2, List2); -} - -void UpdateMcdDlg() { - int i; - - for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); - for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); - UpdateListItems(1, List1); - UpdateListItems(2, List2); -} - -void StopTimer() { - g_timer_stop(Gtimer); timer = 0; -} - -void OnMcd_Ok() { - char *tmp; - - StopTimer(); - - tmp = gtk_entry_get_text(GTK_ENTRY(Entry1)); - strcpy(Config.Mcd1, tmp); - tmp = gtk_entry_get_text(GTK_ENTRY(Entry2)); - strcpy(Config.Mcd2, tmp); - - SaveConfig(); - LoadMcds(Config.Mcd1, Config.Mcd2); - - gtk_widget_destroy(McdDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); -// gtk_main_quit(); -} - -void OnMcd_Cancel() { - StopTimer(); - - LoadMcds(Config.Mcd1, Config.Mcd2); - - gtk_widget_destroy(McdDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); -// gtk_main_quit(); -} - -void OnMcdFS1_Ok() { - gchar *File; - - File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - gtk_entry_set_text(GTK_ENTRY(Entry1), File); - - LoadMcd(1, File); - UpdateMcdDlg(); - - gtk_widget_destroy(FileSel); -} - -void OnMcdFS2_Ok() { - gchar *File; - - File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - gtk_entry_set_text(GTK_ENTRY(Entry2), File); - - LoadMcd(2, File); - UpdateMcdDlg(); - - gtk_widget_destroy(FileSel); -} - -void OnMcdFS_Cancel() { - gtk_widget_destroy(FileSel); -} - -void OnMcd_FS1() { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new("Select Psx Mcd File"); - gtk_file_selection_set_filename(GTK_FILE_SELECTION(FileSel), gtk_entry_get_text(GTK_ENTRY(Entry1))); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMcdFS1_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnMcdFS_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -void OnMcd_FS2() { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new("Select Psx Mcd File"); - gtk_file_selection_set_filename(GTK_FILE_SELECTION(FileSel), gtk_entry_get_text(GTK_ENTRY(Entry2))); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMcdFS2_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnMcdFS_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -GtkWidget *MsgBoxDlg; -int yes; - -void OnMsgBox_Yes() { - yes = 1; - gtk_widget_destroy(MsgBoxDlg); - gtk_main_quit(); -} - -void OnMsgBox_No() { - yes = 0; - gtk_widget_destroy(MsgBoxDlg); - gtk_main_quit(); -} - -int MessageBox(char *msg, char *title) { - GtkWidget *Ok,*Txt; - GtkWidget *Box,*Box1; - int w; - - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; - - w = strlen(msg) * 6 + 20; - - MsgBoxDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_widget_set_usize(MsgBoxDlg, w, 70); - gtk_window_set_position(GTK_WINDOW(MsgBoxDlg), GTK_WIN_POS_CENTER); - gtk_window_set_title(GTK_WINDOW(MsgBoxDlg), title); - gtk_container_set_border_width(GTK_CONTAINER(MsgBoxDlg), 0); - - Box = gtk_vbox_new(0, 0); - gtk_container_add(GTK_CONTAINER(MsgBoxDlg), Box); - gtk_widget_show(Box); - - Txt = gtk_label_new(msg); - - gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); - gtk_widget_show(Txt); - - Box1 = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); - gtk_widget_show(Box1); - - Ok = gtk_button_new_with_label("Yes"); - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsgBox_Yes), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - Ok = gtk_button_new_with_label("No"); - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsgBox_No), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - gtk_widget_show(MsgBoxDlg); - - gtk_main(); - - return yes; -} - -void OnMcd_Format1() { - char *str; - - if (MessageBox("Are you sure you want to format this Memory Card?", "Confirmation") == 0) return; - str = gtk_entry_get_text(GTK_ENTRY(Entry1)); - CreateMcd(str); - LoadMcd(1, str); - UpdateMcdDlg(); -} - -void OnMcd_Format2() { - char *str; - - if (MessageBox("Are you sure you want to format this Memory Card?", "Confirmation") == 0) return; - str = gtk_entry_get_text(GTK_ENTRY(Entry2)); - CreateMcd(str); - LoadMcd(2, str); - UpdateMcdDlg(); -} - -void OnMcd_Reload1() { - char *str; - - str = gtk_entry_get_text(GTK_ENTRY(Entry1)); - LoadMcd(1, str); - UpdateMcdDlg(); -} - -void OnMcd_Reload2() { - char *str; - - str = gtk_entry_get_text(GTK_ENTRY(Entry2)); - LoadMcd(2, str); - UpdateMcdDlg(); -} - -static int copy = 0, copymcd = 0; - -void OnMcd_CopyTo1() { - int i = GTK_CLIST(List2)->focus_row; - - copy = i; - copymcd = 1; - - gtk_widget_set_sensitive(BtnPaste, TRUE); -} - -void OnMcd_CopyTo2() { - int i = GTK_CLIST(List1)->focus_row; - - copy = i; - copymcd = 2; - - gtk_widget_set_sensitive(BtnPaste, TRUE); -} - -void OnMcd_Paste() { - int i; - char *str; - - if (MessageBox("Are you sure you want to paste this selection?", "Confirmation") == 0) return; - - if (copymcd == 1) { - str = gtk_entry_get_text(GTK_ENTRY(Entry1)); - i = GTK_CLIST(List1)->focus_row; - - // save dir data + save data - memcpy(Mcd1Data + (i+1) * 128, Mcd2Data + (copy+1) * 128, 128); - SaveMcd(str, Mcd1Data, (i+1) * 128, 128); - memcpy(Mcd1Data + (i+1) * 1024 * 8, Mcd2Data + (copy+1) * 1024 * 8, 1024 * 8); - SaveMcd(str, Mcd1Data, (i+1) * 1024 * 8, 1024 * 8); - } else { // 2 - str = gtk_entry_get_text(GTK_ENTRY(Entry2)); - i = GTK_CLIST(List2)->focus_row; - - // save dir data + save data - memcpy(Mcd2Data + (i+1) * 128, Mcd1Data + (copy+1) * 128, 128); - SaveMcd(str, Mcd2Data, (i+1) * 128, 128); - memcpy(Mcd2Data + (i+1) * 1024 * 8, Mcd1Data + (copy+1) * 1024 * 8, 1024 * 8); - SaveMcd(str, Mcd2Data, (i+1) * 1024 * 8, 1024 * 8); - } - - UpdateMcdDlg(); -} - -void OnMcd_Delete1() { - McdBlock *Info; - int mcd = 1; - int i, xor = 0, j; - unsigned char *data, *ptr; - char *str; - - str = gtk_entry_get_text(GTK_ENTRY(Entry1)); - i = GTK_CLIST(List1)->focus_row; - data = Mcd1Data; - - i++; - - ptr = data + i * 128; - - Info = &Blocks[mcd-1][i-1]; - - if ((Info->Flags & 0xF0) == 0xA0) { - if ((Info->Flags & 0xF) >= 1 && - (Info->Flags & 0xF) <= 3) { // deleted - *ptr = 0x50 | (Info->Flags & 0xF); - } else return; - } else if ((Info->Flags & 0xF0) == 0x50) { // used - *ptr = 0xA0 | (Info->Flags & 0xF); - } else { return; } - - for (j=0; j<127; j++) xor^=*ptr++; - *ptr = xor; - - SaveMcd(str, data, i * 128, 128); - UpdateMcdDlg(); -} - -void OnMcd_Delete2() { - McdBlock *Info; - int mcd = 2; - int i, xor = 0, j; - unsigned char *data, *ptr; - char *str; - - str = gtk_entry_get_text(GTK_ENTRY(Entry2)); - i = GTK_CLIST(List2)->focus_row; - data = Mcd2Data; - - i++; - - ptr = data + i * 128; - - Info = &Blocks[mcd-1][i-1]; - - if ((Info->Flags & 0xF0) == 0xA0) { - if ((Info->Flags & 0xF) >= 1 && - (Info->Flags & 0xF) <= 3) { // deleted - *ptr = 0x50 | (Info->Flags & 0xF); - } else return; - } else if ((Info->Flags & 0xF0) == 0x50) { // used - *ptr = 0xA0 | (Info->Flags & 0xF); - } else { return; } - - for (j=0; j<127; j++) xor^=*ptr++; - *ptr = xor; - - SaveMcd(str, data, i * 128, 128); - UpdateMcdDlg(); -} - -void UpdateMcdIcon(int mcd, GtkWidget *List) { - int i; - - for (i=1; i<16; i++) { - McdBlock *Info; - int *count; - - Info = &Blocks[mcd-1][i-1]; - count = &IconC[mcd-1][i-1]; - - if (Info->IconCount <= 1) continue; - - (*count)++; - if (*count == Info->IconCount) *count = 0; - - SetIcon(&Info->Icon[*count*16*16], List, i); - } -} - -void OnConf_Mcds() { - McdDlg = create_McdsDlg(); - gtk_window_set_title(GTK_WINDOW(McdDlg), "P©SX Memcard Manager"); - - Entry1 = lookup_widget(McdDlg, "GtkEntry_Mcd1"); - if (!strlen(Config.Mcd1)) strcpy(Config.Mcd1, "memcards/Mcd001.mcr"); - gtk_entry_set_text(GTK_ENTRY(Entry1), Config.Mcd1); - - Entry2 = lookup_widget(McdDlg, "GtkEntry_Mcd2"); - if (!strlen(Config.Mcd2)) strcpy(Config.Mcd2, "memcards/Mcd002.mcr"); - gtk_entry_set_text(GTK_ENTRY(Entry2), Config.Mcd2); - - List1 = lookup_widget(McdDlg, "GtkCList_McdList1"); - List2 = lookup_widget(McdDlg, "GtkCList_McdList2"); - - BtnPaste = lookup_widget(McdDlg, "GtkButton_McdPaste"); - gtk_widget_set_sensitive(BtnPaste, FALSE); - - gtk_clist_set_column_justification(GTK_CLIST(List1), 0, GTK_JUSTIFY_CENTER); - gtk_clist_set_column_justification(GTK_CLIST(List2), 0, GTK_JUSTIFY_CENTER); - gtk_clist_set_column_justification(GTK_CLIST(List1), 2, GTK_JUSTIFY_CENTER); - gtk_clist_set_column_justification(GTK_CLIST(List2), 2, GTK_JUSTIFY_CENTER); - - gtk_widget_show_all(McdDlg); - - LoadMcdDlg(); - - if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); - - Gtimer = g_timer_new(); timer = 1; - - while (gtk_events_pending()) gtk_main_iteration(); - - while (timer) { - unsigned long usecs; - - g_timer_elapsed(Gtimer, &usecs); - if (usecs > 250000) { - UpdateMcdIcon(1, List1); - UpdateMcdIcon(2, List2); - g_timer_reset(Gtimer); - } - - while (gtk_events_pending()) gtk_main_iteration(); - } -} - -GtkWidget *CpuDlg; -GtkWidget *PsxCombo; -GList *psxglist; -char *psxtypes[] = { - "NTSC", - "PAL" -}; - -void OnCpu_Ok() { - GtkWidget *Btn; - char *tmp; - long t; - - tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(PsxCombo)->entry)); - - if (!strcmp("NTSC",tmp)) Config.PsxType = 0; - else Config.PsxType = 1; // pal - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Xa"); - Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Sio"); - Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Mdec"); - Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cdda"); - Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxAuto"); - Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - t = Config.Cpu; - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cpu"); - Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - if (t != Config.Cpu) { - psxCpu->Shutdown(); - if (Config.Cpu) - psxCpu = &psxInt; - else psxCpu = &psxRec; - if (psxCpu->Init() == -1) { - SysClose(); - exit(1); - } - psxCpu->Reset(); - } - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_CpuLog"); - Config.Log = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxOut"); - Config.PsxOut = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_SpuIrq"); - Config.SpuIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_CdTiming"); - Config.CdTiming = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); - - gtk_widget_destroy(CpuDlg); - - SaveConfig(); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - -void OnCpu_Cancel() { - gtk_widget_destroy(CpuDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - - -void OnConf_Cpu() { - GtkWidget *Btn; - int i; - - CpuDlg = create_CpuDlg(); - gtk_window_set_title(GTK_WINDOW(CpuDlg), "P©SX Configuration"); - - psxglist = NULL; - for (i=0;i<2;i++) - psxglist = g_list_append(psxglist, psxtypes[i]); - PsxCombo = lookup_widget(CpuDlg, "GtkCombo_PsxType"); - gtk_combo_set_popdown_strings(GTK_COMBO(PsxCombo), psxglist); - gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(PsxCombo)->entry), psxtypes[Config.PsxType]); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Xa"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Xa); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Sio"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Sio); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Mdec"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Mdec); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cdda"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Cdda); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxAuto"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.PsxAuto); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cpu"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Cpu); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_CpuLog"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Log); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxOut"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.PsxOut); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_SpuIrq"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.SpuIrq); - - Btn = lookup_widget(CpuDlg, "GtkCheckButton_CdTiming"); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.CdTiming); - - gtk_widget_show_all(CpuDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); - gtk_main(); -} - -#define FindComboText(combo,list,conf) \ - if (strlen(conf) > 0) { \ - int i; \ - for (i=2;i<255;i+=2) { \ - if (!strcmp(conf, list[i-2])) { \ - gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), list[i-1]); \ - break; \ - } \ - } \ - } - -#define GetComboText(combo,list,conf) \ - { \ - int i; \ - char *tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry)); \ - for (i=2;i<255;i+=2) { \ - if (!strcmp(tmp, list[i-1])) { \ - strcpy(conf, list[i-2]); \ - break; \ - } \ - } \ - } - -void OnConfConf_Ok() { - GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu); - GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu); - GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr); - GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1); - GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2); - GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios); - - SaveConfig(); - - ReleasePlugins(); - LoadPlugins(); - - needreset = 1; - gtk_widget_destroy(ConfDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - -void OnConfConf_Cancel() { - gtk_widget_destroy(ConfDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - -#define ConfPlugin(src, confs, plugin, name) \ - void *drv; \ - src conf; \ - char file[256]; \ - \ - GetComboText(confs.Combo, confs.plist, plugin); \ - strcpy(file, Config.PluginsDir); \ - strcat(file, plugin); \ - gtk_widget_set_sensitive(ConfDlg, FALSE); \ - drv = SysLoadLibrary(file); \ - if (drv == NULL) return; \ - conf = (src) SysLoadSym(drv, name); \ - if (SysLibError() == NULL) conf(); \ - else SysMessage("Plugin doesn't needs to be configured"); \ - SysCloseLibrary(drv); \ - gtk_widget_set_sensitive(ConfDlg, TRUE); - -#define TestPlugin(src, confs, plugin, name) \ - void *drv; \ - src conf; \ - int ret = 0; \ - char file[256]; \ - \ - GetComboText(confs.Combo, confs.plist, plugin); \ - strcpy(file, Config.PluginsDir); \ - strcat(file, plugin); \ - gtk_widget_set_sensitive(ConfDlg, FALSE); \ - drv = SysLoadLibrary(file); \ - if (drv == NULL) return; \ - conf = (src) SysLoadSym(drv, name); \ - if (SysLibError() == NULL) ret = conf(); \ - SysCloseLibrary(drv); \ - SysMessage("This plugin reports that should %swork correctly", ret == 0 ? "" : "not "); \ - gtk_widget_set_sensitive(ConfDlg, TRUE); - -void OnConfConf_GpuConf() { - ConfPlugin(GPUconfigure, GpuConfS, Config.Gpu, "GPUconfigure"); -} - -void OnConfConf_GpuTest() { - TestPlugin(GPUtest, GpuConfS, Config.Gpu, "GPUtest"); -} - -void OnConfConf_GpuAbout() { - ConfPlugin(GPUabout, GpuConfS, Config.Gpu, "GPUabout"); -} - -void OnConfConf_SpuConf() { - ConfPlugin(SPUconfigure, SpuConfS, Config.Spu, "SPUconfigure"); -} - -void OnConfConf_SpuTest() { - TestPlugin(SPUtest, SpuConfS, Config.Spu, "SPUtest"); -} - -void OnConfConf_SpuAbout() { - ConfPlugin(SPUabout, SpuConfS, Config.Spu, "SPUabout"); -} - -void OnConfConf_CdrConf() { - ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRconfigure"); -} - -void OnConfConf_CdrTest() { - TestPlugin(CDRtest, CdrConfS, Config.Cdr, "CDRtest"); -} - -void OnConfConf_CdrAbout() { - ConfPlugin(CDRabout, CdrConfS, Config.Cdr, "CDRabout"); -} - -void OnConfConf_Pad1Conf() { - ConfPlugin(PADconfigure, Pad1ConfS, Config.Pad1, "PADconfigure"); -} - -void OnConfConf_Pad1Test() { - TestPlugin(PADtest, Pad1ConfS, Config.Pad1, "PADtest"); -} - -void OnConfConf_Pad1About() { - ConfPlugin(PADabout, Pad1ConfS, Config.Pad1, "PADabout"); -} - -void OnConfConf_Pad2Conf() { - ConfPlugin(PADconfigure, Pad2ConfS, Config.Pad2, "PADconfigure"); -} - -void OnConfConf_Pad2Test() { - TestPlugin(PADtest, Pad2ConfS, Config.Pad2, "PADtest"); -} - -void OnConfConf_Pad2About() { - ConfPlugin(PADabout, Pad2ConfS, Config.Pad2, "PADabout"); -} - -void OnPluginsPath_Ok() { - gchar *File; - - File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - strcpy(Config.PluginsDir, File); - if (Config.PluginsDir[strlen(Config.PluginsDir)-1] != '/') - strcat(Config.PluginsDir, "/"); - - FindPlugins(); - - gtk_widget_destroy(FileSel); -} - -void OnPluginsPath_Cancel() { - gtk_widget_destroy(FileSel); -} - -void OnConfConf_PluginsPath() { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new("Select Plugins Directory"); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -void OnBiosPath_Ok() { - gchar *File; - - File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); - strcpy(Config.BiosDir, File); - if (Config.BiosDir[strlen(Config.BiosDir)-1] != '/') - strcat(Config.BiosDir, "/"); - - FindPlugins(); - - gtk_widget_destroy(FileSel); -} - -void OnBiosPath_Cancel() { - gtk_widget_destroy(FileSel); -} - -void OnConfConf_BiosPath() { - GtkWidget *Ok,*Cancel; - - FileSel = gtk_file_selection_new("Select Bios Directory"); - - Ok = GTK_FILE_SELECTION(FileSel)->ok_button; - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Ok), NULL); - gtk_widget_show(Ok); - - Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; - gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Cancel), NULL); - gtk_widget_show(Cancel); - - gtk_widget_show(FileSel); - gdk_window_raise(FileSel->window); -} - -void OnConf_Conf() { - ConfDlg = create_ConfDlg(); - gtk_window_set_title(GTK_WINDOW(ConfDlg), "P©SX Configuration"); - - FindPlugins(); - - gtk_widget_show_all(ConfDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); - gtk_main(); -} - -void OnDebug() { - DebugDlg = create_DebugDlg(); - gtk_widget_show_all(DebugDlg); - - if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); - gtk_main(); -} - -void OnDebug_Ok() { - gtk_widget_destroy(DebugDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - -void OnHelp_Help() { -} - -void OnHelpAbout_Ok() { - gtk_widget_destroy(AboutDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); - gtk_main_quit(); -} - -void OnHelp_About() { - GtkWidget *Label; - - AboutDlg = create_AboutDlg(); - gtk_window_set_title(GTK_WINDOW(AboutDlg), "About P©SX"); - - Label = lookup_widget(AboutDlg, "GtkAbout_LabelVersion"); - gtk_label_set_text(GTK_LABEL(Label), - "P©SX For Linux\n" - "Version " PCSX_VERSION); - - Label = lookup_widget(AboutDlg, "GtkAbout_LabelAuthors"); - gtk_label_set_text(GTK_LABEL(Label), - "PCSX a psx emulator\n\n" - "written by:\n" - "main coder: linuzappz\n" - "co-coders: shadow\n" - "ex-coders: Nocomp, Pete Bernett, nik3d\n" - "Webmaster: AkumaX"); - - Label = lookup_widget(AboutDlg, "GtkAbout_LabelGreets"); - gtk_label_set_text(GTK_LABEL(Label), - "Greets to: Duddie, Tratax, Kazzuya, JNS, Bobbi, Psychojak and Shunt\n" - "Special thanks to:\n" - "Twin (we Love you twin0r), Roor (love for you too),\n" - "calb (Thanks for help :) ), now3d (for great help to my psxdev stuff :) )"); - - gtk_widget_show_all(AboutDlg); - if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); - gtk_main(); -} - -#define ComboAddPlugin(type) { \ - ##type##ConfS.plugins+=2; \ - strcpy(##type##ConfS.plist[##type##ConfS.plugins-1], name); \ - strcpy(##type##ConfS.plist[##type##ConfS.plugins-2], ent->d_name); \ - ##type##ConfS.glist = g_list_append(##type##ConfS.glist, ##type##ConfS.plist[##type##ConfS.plugins-1]); \ -} - -#define ConfCreatePConf(name, type) \ - if (type##ConfS.glist != NULL) { \ - type##ConfS.Combo = lookup_widget(ConfDlg, "GtkCombo_" name); \ - gtk_combo_set_popdown_strings(GTK_COMBO(type##ConfS.Combo), type##ConfS.glist); \ - FindComboText(type##ConfS.Combo, type##ConfS.plist, Config.##type##); \ - } - -void FindPlugins() { - DIR *dir; - struct dirent *ent; - void *Handle; - char plugin[256],name[256]; - - GpuConfS.plugins = 0; SpuConfS.plugins = 0; CdrConfS.plugins = 0; - Pad1ConfS.plugins = 0; Pad2ConfS.plugins = 0; BiosConfS.plugins = 0; - GpuConfS.glist = NULL; SpuConfS.glist = NULL; CdrConfS.glist = NULL; - Pad1ConfS.glist = NULL; Pad2ConfS.glist = NULL; BiosConfS.glist = NULL; - - dir = opendir(Config.PluginsDir); - if (dir == NULL) { - SysMessage("Could not open '%s' directory\n", Config.PluginsDir); - return; - } - while ((ent = readdir(dir)) != NULL) { - long type,v; - - sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name); - - if (strstr(plugin, ".so") == NULL) continue; - Handle = dlopen(plugin, RTLD_NOW); - if (Handle == NULL) continue; - - PSE_getLibType = (PSEgetLibType) dlsym(Handle, "PSEgetLibType"); - if (dlerror() != NULL) { - if (strstr(plugin, "gpu") != NULL) type = PSE_LT_GPU; - else if (strstr(plugin, "cdr") != NULL) type = PSE_LT_CDR; - else if (strstr(plugin, "spu") != NULL) type = PSE_LT_SPU; - else if (strstr(plugin, "pad") != NULL) type = PSE_LT_PAD; - else continue; - } - else type = PSE_getLibType(); - - PSE_getLibName = (PSEgetLibName) dlsym(Handle, "PSEgetLibName"); - if (dlerror() == NULL) { - sprintf(name, "%s", PSE_getLibName()); - PSE_getLibVersion = (PSEgetLibVersion) dlsym(Handle, "PSEgetLibVersion"); - if (dlerror() == NULL) { - char ver[32]; - - v = PSE_getLibVersion(); - sprintf(ver, " %ld.%ld.%ld",v>>16,(v>>8)&0xff,v&0xff); - strcat(name, ver); - } - } - else strcpy(name, ent->d_name); - - if (type & PSE_LT_CDR) { - ComboAddPlugin(Cdr); - } - if (type & PSE_LT_GPU) { - ComboAddPlugin(Gpu); - } - if (type & PSE_LT_SPU) { - ComboAddPlugin(Spu); - } - if (type & PSE_LT_PAD) { - PADquery query = (PADquery)dlsym(Handle, "PADquery"); - if (query() & 0x1) { - ComboAddPlugin(Pad1); - } - if (query() & 0x2) { - ComboAddPlugin(Pad2); - } - } - } - closedir(dir); - - ConfCreatePConf("Gpu", Gpu); - ConfCreatePConf("Spu", Spu); - ConfCreatePConf("Pad1", Pad1); - ConfCreatePConf("Pad2", Pad2); - ConfCreatePConf("Cdr", Cdr); - - BiosConfS.plugins+=2; - strcpy(BiosConfS.plist[BiosConfS.plugins-1], "Internal HLE Bios"); - strcpy(BiosConfS.plist[BiosConfS.plugins-2], "HLE"); - BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins-1]); - - dir = opendir(Config.BiosDir); - if (dir == NULL) { - SysMessage("Could not open '%s' directory\n", Config.BiosDir); - return; - } - - while ((ent = readdir(dir)) != NULL) { - struct stat buf; - - sprintf (plugin, "%s%s", Config.BiosDir, ent->d_name); - if (stat(plugin, &buf) == -1) continue; - if (buf.st_size != (1024*512)) continue; - - BiosConfS.plugins+=2; - strcpy(BiosConfS.plist[BiosConfS.plugins-1], ent->d_name); - strcpy(BiosConfS.plist[BiosConfS.plugins-2], ent->d_name); - BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins-1]); - } - closedir(dir); - - ConfCreatePConf("Bios", Bios); -} - -GtkWidget *MsgDlg; - -void OnMsg_Ok() { - gtk_widget_destroy(MsgDlg); - gtk_main_quit(); -} - -void SysMessage(char *fmt, ...) { - GtkWidget *Ok,*Txt; - GtkWidget *Box,*Box1; - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; - - if (!UseGui) { printf ("%s\n",msg); return; } - - MsgDlg = gtk_window_new (GTK_WINDOW_DIALOG); - gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); - gtk_window_set_title(GTK_WINDOW(MsgDlg), "P©SX Msg"); - gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5); - - Box = gtk_vbox_new(5, 0); - gtk_container_add(GTK_CONTAINER(MsgDlg), Box); - gtk_widget_show(Box); - - Txt = gtk_label_new(msg); - - gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); - gtk_widget_show(Txt); - - Box1 = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); - gtk_widget_show(Box1); - - Ok = gtk_button_new_with_label("Ok"); - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - gtk_widget_show(MsgDlg); - - gtk_main(); -} - +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Linux.h" +#include "plugins.h" +#include "Sio.h" +#include "GladeGui.h" +#include "GladeFuncs.h" + +extern int UseGui; +long LoadCdBios; +static int needreset = 1; + +PSEgetLibType PSE_getLibType = NULL; +PSEgetLibVersion PSE_getLibVersion = NULL; +PSEgetLibName PSE_getLibName = NULL; + +// Helper Functions +void FindPlugins(); + +// Functions Callbacks +void OnFile_RunExe(); +void OnFile_RunCd(); +void OnFile_RunCdBios(); +void OnFile_Exit(); +void OnEmu_Run(); +void OnEmu_Reset(); +void OnConf_Gpu(); +void OnConf_Spu(); +void OnConf_Cdr(); +void OnConf_Pads(); +void OnConf_Mcds(); +void OnConf_Cpu(); +void OnConf_Conf(); +void OnHelp_Help(); +void OnHelp_About(); + +GtkWidget *Window = NULL; +GtkWidget *ConfDlg; +GtkWidget *DebugDlg; +GtkWidget *AboutDlg; +GtkWidget *FileSel; + +GtkAccelGroup *AccelGroup; + +typedef struct { + GtkWidget *Combo; + GList *glist; + char plist[255][255]; + int plugins; +} PluginConf; + +PluginConf GpuConfS; +PluginConf SpuConfS; +PluginConf CdrConfS; +PluginConf Pad1ConfS; +PluginConf Pad2ConfS; +PluginConf BiosConfS; + +void StartGui() { + Window = create_MainWindow(); + gtk_window_set_title(GTK_WINDOW(Window), "P©SX"); + + gtk_widget_show_all(Window); + gtk_main(); +} + +void RunGui() { + StartGui(); +} + +int destroy=0; + +void OnDestroy() { + if (!destroy) OnFile_Exit(); +} + +void ConfigurePlugins() { + if (!UseGui) return; + OnConf_Conf(); +} + +void ConfigureMemcards() { + OnConf_Mcds(); +} + +void OnRunExe_Ok() { + gchar *File; + char exe[256]; + + File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); + strcpy(exe, File); + gtk_widget_destroy(FileSel); + destroy=1; + gtk_widget_destroy(Window); + destroy=0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); + OpenPlugins(); + SysReset(); + needreset = 0; + Load(exe); + psxCpu->Execute(); +} + +void OnRunExe_Cancel() { + gtk_widget_destroy(FileSel); +} + +void OnFile_RunExe() { + GtkWidget *Ok,*Cancel; + + FileSel = gtk_file_selection_new("Select Psx Exe File"); + + Ok = GTK_FILE_SELECTION(FileSel)->ok_button; + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnRunExe_Ok), NULL); + gtk_widget_show(Ok); + + Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; + gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnRunExe_Cancel), NULL); + gtk_widget_show(Cancel); + + gtk_widget_show(FileSel); + gdk_window_raise(FileSel->window); +} + +void OnFile_RunCd() { + LoadCdBios = 0; + destroy=1; + gtk_widget_destroy(Window); + destroy=0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); + OpenPlugins(); + SysReset(); + needreset = 0; + CheckCdrom(); + if (LoadCdrom() == -1) { + ClosePlugins(); + SysMessage("Could not load Cdrom\n"); + return; + } + psxCpu->Execute(); +} + +void OnFile_RunCdBios() { + LoadCdBios = 1; + destroy=1; + gtk_widget_destroy(Window); + destroy=0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); + OpenPlugins(); + SysReset(); + needreset = 0; + CheckCdrom(); + psxCpu->Execute(); +} + +void OnFile_Exit() { + DIR *dir; + struct dirent *ent; + void *Handle; + char plugin[256]; + + // with this the problem with plugins that are linked with the pthread + // library is solved + + dir = opendir(Config.PluginsDir); + if (dir != NULL) { + while ((ent = readdir(dir)) != NULL) { + sprintf (plugin, "%s%s", Config.PluginsDir, ent->d_name); + + if (strstr(plugin, ".so") == NULL) continue; + Handle = dlopen(plugin, RTLD_NOW); + if (Handle == NULL) continue; + } + } + + printf ("P©SX Quitting\n"); + if (UseGui) gtk_main_quit(); + SysClose(); + if (UseGui) gtk_exit(0); + else exit(0); +} + +void OnEmu_Run() { + destroy=1; + gtk_widget_destroy(Window); + destroy=0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); + OpenPlugins(); + if (needreset) { SysReset(); needreset = 0; } + psxCpu->Execute(); +} + +void OnEmu_Reset() { + needreset = 1; +} + +void OnConf_Gpu() { + gtk_widget_set_sensitive(Window, FALSE); + GPU_configure(); + gtk_widget_set_sensitive(Window, TRUE); +} + +void OnConf_Spu() { + gtk_widget_set_sensitive(Window, FALSE); + SPU_configure(); + gtk_widget_set_sensitive(Window, TRUE); +} + +void OnConf_Cdr() { + gtk_widget_set_sensitive(Window, FALSE); + CDR_configure(); + gtk_widget_set_sensitive(Window, TRUE); +} + +void OnConf_Pads() { + gtk_widget_set_sensitive(Window, FALSE); + PAD1_configure(); + if (strcmp(Config.Pad1, Config.Pad2)) PAD2_configure(); + gtk_widget_set_sensitive(Window, TRUE); +} + +GtkWidget *McdDlg; +GtkWidget *Entry1,*Entry2; +GtkWidget *List1,*List2; +GtkWidget *BtnPaste; +GTimer *Gtimer; +int timer; +McdBlock Blocks[2][15]; +int IconC[2][15]; + +void SetIcon(short *icon, GtkWidget *List, int i) { + GdkPixmap *pixmap; + GdkImage *image; + GdkVisual *visual; + GdkGC *gc; + int x, y, c; + + visual = gdk_window_get_visual(McdDlg->window); + + if (visual->depth == 8) return; + + image = gdk_image_new(GDK_IMAGE_NORMAL, visual, 16, 16); + + for (y=0; y<16; y++) { + for (x=0; x<16; x++) { + c = icon[y*16+x]; + c = ((c&0x001f) << 10) | ((c&0x7c00) >> 10) | (c&0x03e0); + if (visual->depth == 16) + c = (c&0x001f) | ((c&0x7c00) << 1) | ((c&0x03e0) << 1); + else if (visual->depth == 24 || visual->depth == 32) + c = ((c&0x001f) << 3) | ((c&0x03e0) << 6) | ((c&0x7c00) << 9); + + gdk_image_put_pixel(image, x, y, c); + } + } + + pixmap = gdk_pixmap_new(McdDlg->window, 16, 16, visual->depth); + + gc = gdk_gc_new(pixmap); + gdk_draw_image(pixmap, gc, image, 0, 0, 0, 0, 16, 16); + gdk_gc_destroy(gc); + gdk_image_destroy(image); + + gtk_clist_set_pixmap(GTK_CLIST(List), i-1, 0, pixmap, NULL); +} + +void LoadListItems(int mcd, GtkWidget *List) { + int i; + + gtk_clist_clear(GTK_CLIST(List)); + + for (i=1; i<16; i++) { + McdBlock *Info; + gchar *text[5]; + + Info = &Blocks[mcd-1][i-1]; + IconC[mcd-1][i-1] = 0; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + text[2] = "Deleted"; + } else text[2] = "Free"; + } else if ((Info->Flags & 0xF0) == 0x50) + text[2] = "Used"; + else { text[2] = "Free"; } + + text[0] = ""; + text[1] = Info->Title; + text[3] = Info->ID; + text[4] = Info->Name; + + gtk_clist_insert(GTK_CLIST(List), i-1, text); + + if (Info->IconCount == 0) continue; + + SetIcon(Info->Icon, List, i); + } +} + +void UpdateListItems(int mcd, GtkWidget *List) { + int i,j; + + for (i=1; i<16; i++) { + McdBlock *Info; + gchar *text[5]; + + Info = &Blocks[mcd-1][i-1]; + IconC[mcd-1][i-1] = 0; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { + text[2] = "Deleted"; + } else text[2] = "Free"; + } else if ((Info->Flags & 0xF0) == 0x50) + text[2] = "Used"; + else { text[2] = "Free"; } + + text[0] = ""; + text[1] = Info->Title; + text[3] = Info->ID; + text[4] = Info->Name; + + for (j=0; j<5; j++) + gtk_clist_set_text(GTK_CLIST(List), i-1, j, text[j]); + + if (Info->IconCount == 0) continue; + + SetIcon(Info->Icon, List, i); + } +} + +void LoadMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + LoadListItems(1, List1); + LoadListItems(2, List2); +} + +void UpdateMcdDlg() { + int i; + + for (i=1; i<16; i++) GetMcdBlockInfo(1, i, &Blocks[0][i-1]); + for (i=1; i<16; i++) GetMcdBlockInfo(2, i, &Blocks[1][i-1]); + UpdateListItems(1, List1); + UpdateListItems(2, List2); +} + +void StopTimer() { + g_timer_stop(Gtimer); timer = 0; +} + +void OnMcd_Ok() { + char *tmp; + + StopTimer(); + + tmp = gtk_entry_get_text(GTK_ENTRY(Entry1)); + strcpy(Config.Mcd1, tmp); + tmp = gtk_entry_get_text(GTK_ENTRY(Entry2)); + strcpy(Config.Mcd2, tmp); + + SaveConfig(); + LoadMcds(Config.Mcd1, Config.Mcd2); + + gtk_widget_destroy(McdDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); +// gtk_main_quit(); +} + +void OnMcd_Cancel() { + StopTimer(); + + LoadMcds(Config.Mcd1, Config.Mcd2); + + gtk_widget_destroy(McdDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); +// gtk_main_quit(); +} + +void OnMcdFS1_Ok() { + gchar *File; + + File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); + gtk_entry_set_text(GTK_ENTRY(Entry1), File); + + LoadMcd(1, File); + UpdateMcdDlg(); + + gtk_widget_destroy(FileSel); +} + +void OnMcdFS2_Ok() { + gchar *File; + + File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); + gtk_entry_set_text(GTK_ENTRY(Entry2), File); + + LoadMcd(2, File); + UpdateMcdDlg(); + + gtk_widget_destroy(FileSel); +} + +void OnMcdFS_Cancel() { + gtk_widget_destroy(FileSel); +} + +void OnMcd_FS1() { + GtkWidget *Ok,*Cancel; + + FileSel = gtk_file_selection_new("Select Psx Mcd File"); + gtk_file_selection_set_filename(GTK_FILE_SELECTION(FileSel), gtk_entry_get_text(GTK_ENTRY(Entry1))); + + Ok = GTK_FILE_SELECTION(FileSel)->ok_button; + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMcdFS1_Ok), NULL); + gtk_widget_show(Ok); + + Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; + gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnMcdFS_Cancel), NULL); + gtk_widget_show(Cancel); + + gtk_widget_show(FileSel); + gdk_window_raise(FileSel->window); +} + +void OnMcd_FS2() { + GtkWidget *Ok,*Cancel; + + FileSel = gtk_file_selection_new("Select Psx Mcd File"); + gtk_file_selection_set_filename(GTK_FILE_SELECTION(FileSel), gtk_entry_get_text(GTK_ENTRY(Entry2))); + + Ok = GTK_FILE_SELECTION(FileSel)->ok_button; + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMcdFS2_Ok), NULL); + gtk_widget_show(Ok); + + Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; + gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnMcdFS_Cancel), NULL); + gtk_widget_show(Cancel); + + gtk_widget_show(FileSel); + gdk_window_raise(FileSel->window); +} + +GtkWidget *MsgBoxDlg; +int yes; + +void OnMsgBox_Yes() { + yes = 1; + gtk_widget_destroy(MsgBoxDlg); + gtk_main_quit(); +} + +void OnMsgBox_No() { + yes = 0; + gtk_widget_destroy(MsgBoxDlg); + gtk_main_quit(); +} + +int MessageBox(char *msg, char *title) { + GtkWidget *Ok,*Txt; + GtkWidget *Box,*Box1; + int w; + + if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; + + w = strlen(msg) * 6 + 20; + + MsgBoxDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_widget_set_usize(MsgBoxDlg, w, 70); + gtk_window_set_position(GTK_WINDOW(MsgBoxDlg), GTK_WIN_POS_CENTER); + gtk_window_set_title(GTK_WINDOW(MsgBoxDlg), title); + gtk_container_set_border_width(GTK_CONTAINER(MsgBoxDlg), 0); + + Box = gtk_vbox_new(0, 0); + gtk_container_add(GTK_CONTAINER(MsgBoxDlg), Box); + gtk_widget_show(Box); + + Txt = gtk_label_new(msg); + + gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); + gtk_widget_show(Txt); + + Box1 = gtk_hbutton_box_new(); + gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); + gtk_widget_show(Box1); + + Ok = gtk_button_new_with_label("Yes"); + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsgBox_Yes), NULL); + gtk_container_add(GTK_CONTAINER(Box1), Ok); + GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); + gtk_widget_show(Ok); + + Ok = gtk_button_new_with_label("No"); + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsgBox_No), NULL); + gtk_container_add(GTK_CONTAINER(Box1), Ok); + GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); + gtk_widget_show(Ok); + + gtk_widget_show(MsgBoxDlg); + + gtk_main(); + + return yes; +} + +void OnMcd_Format1() { + char *str; + + if (MessageBox("Are you sure you want to format this Memory Card?", "Confirmation") == 0) return; + str = gtk_entry_get_text(GTK_ENTRY(Entry1)); + CreateMcd(str); + LoadMcd(1, str); + UpdateMcdDlg(); +} + +void OnMcd_Format2() { + char *str; + + if (MessageBox("Are you sure you want to format this Memory Card?", "Confirmation") == 0) return; + str = gtk_entry_get_text(GTK_ENTRY(Entry2)); + CreateMcd(str); + LoadMcd(2, str); + UpdateMcdDlg(); +} + +void OnMcd_Reload1() { + char *str; + + str = gtk_entry_get_text(GTK_ENTRY(Entry1)); + LoadMcd(1, str); + UpdateMcdDlg(); +} + +void OnMcd_Reload2() { + char *str; + + str = gtk_entry_get_text(GTK_ENTRY(Entry2)); + LoadMcd(2, str); + UpdateMcdDlg(); +} + +static int copy = 0, copymcd = 0; + +void OnMcd_CopyTo1() { + int i = GTK_CLIST(List2)->focus_row; + + copy = i; + copymcd = 1; + + gtk_widget_set_sensitive(BtnPaste, TRUE); +} + +void OnMcd_CopyTo2() { + int i = GTK_CLIST(List1)->focus_row; + + copy = i; + copymcd = 2; + + gtk_widget_set_sensitive(BtnPaste, TRUE); +} + +void OnMcd_Paste() { + int i; + char *str; + + if (MessageBox("Are you sure you want to paste this selection?", "Confirmation") == 0) return; + + if (copymcd == 1) { + str = gtk_entry_get_text(GTK_ENTRY(Entry1)); + i = GTK_CLIST(List1)->focus_row; + + // save dir data + save data + memcpy(Mcd1Data + (i+1) * 128, Mcd2Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd1Data, (i+1) * 128, 128); + memcpy(Mcd1Data + (i+1) * 1024 * 8, Mcd2Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd1Data, (i+1) * 1024 * 8, 1024 * 8); + } else { // 2 + str = gtk_entry_get_text(GTK_ENTRY(Entry2)); + i = GTK_CLIST(List2)->focus_row; + + // save dir data + save data + memcpy(Mcd2Data + (i+1) * 128, Mcd1Data + (copy+1) * 128, 128); + SaveMcd(str, Mcd2Data, (i+1) * 128, 128); + memcpy(Mcd2Data + (i+1) * 1024 * 8, Mcd1Data + (copy+1) * 1024 * 8, 1024 * 8); + SaveMcd(str, Mcd2Data, (i+1) * 1024 * 8, 1024 * 8); + } + + UpdateMcdDlg(); +} + +void OnMcd_Delete1() { + McdBlock *Info; + int mcd = 1; + int i, xor = 0, j; + unsigned char *data, *ptr; + char *str; + + str = gtk_entry_get_text(GTK_ENTRY(Entry1)); + i = GTK_CLIST(List1)->focus_row; + data = Mcd1Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); +} + +void OnMcd_Delete2() { + McdBlock *Info; + int mcd = 2; + int i, xor = 0, j; + unsigned char *data, *ptr; + char *str; + + str = gtk_entry_get_text(GTK_ENTRY(Entry2)); + i = GTK_CLIST(List2)->focus_row; + data = Mcd2Data; + + i++; + + ptr = data + i * 128; + + Info = &Blocks[mcd-1][i-1]; + + if ((Info->Flags & 0xF0) == 0xA0) { + if ((Info->Flags & 0xF) >= 1 && + (Info->Flags & 0xF) <= 3) { // deleted + *ptr = 0x50 | (Info->Flags & 0xF); + } else return; + } else if ((Info->Flags & 0xF0) == 0x50) { // used + *ptr = 0xA0 | (Info->Flags & 0xF); + } else { return; } + + for (j=0; j<127; j++) xor^=*ptr++; + *ptr = xor; + + SaveMcd(str, data, i * 128, 128); + UpdateMcdDlg(); +} + +void UpdateMcdIcon(int mcd, GtkWidget *List) { + int i; + + for (i=1; i<16; i++) { + McdBlock *Info; + int *count; + + Info = &Blocks[mcd-1][i-1]; + count = &IconC[mcd-1][i-1]; + + if (Info->IconCount <= 1) continue; + + (*count)++; + if (*count == Info->IconCount) *count = 0; + + SetIcon(&Info->Icon[*count*16*16], List, i); + } +} + +void OnConf_Mcds() { + McdDlg = create_McdsDlg(); + gtk_window_set_title(GTK_WINDOW(McdDlg), "P©SX Memcard Manager"); + + Entry1 = lookup_widget(McdDlg, "GtkEntry_Mcd1"); + if (!strlen(Config.Mcd1)) strcpy(Config.Mcd1, "memcards/Mcd001.mcr"); + gtk_entry_set_text(GTK_ENTRY(Entry1), Config.Mcd1); + + Entry2 = lookup_widget(McdDlg, "GtkEntry_Mcd2"); + if (!strlen(Config.Mcd2)) strcpy(Config.Mcd2, "memcards/Mcd002.mcr"); + gtk_entry_set_text(GTK_ENTRY(Entry2), Config.Mcd2); + + List1 = lookup_widget(McdDlg, "GtkCList_McdList1"); + List2 = lookup_widget(McdDlg, "GtkCList_McdList2"); + + BtnPaste = lookup_widget(McdDlg, "GtkButton_McdPaste"); + gtk_widget_set_sensitive(BtnPaste, FALSE); + + gtk_clist_set_column_justification(GTK_CLIST(List1), 0, GTK_JUSTIFY_CENTER); + gtk_clist_set_column_justification(GTK_CLIST(List2), 0, GTK_JUSTIFY_CENTER); + gtk_clist_set_column_justification(GTK_CLIST(List1), 2, GTK_JUSTIFY_CENTER); + gtk_clist_set_column_justification(GTK_CLIST(List2), 2, GTK_JUSTIFY_CENTER); + + gtk_widget_show_all(McdDlg); + + LoadMcdDlg(); + + if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); + + Gtimer = g_timer_new(); timer = 1; + + while (gtk_events_pending()) gtk_main_iteration(); + + while (timer) { + unsigned long usecs; + + g_timer_elapsed(Gtimer, &usecs); + if (usecs > 250000) { + UpdateMcdIcon(1, List1); + UpdateMcdIcon(2, List2); + g_timer_reset(Gtimer); + } + + while (gtk_events_pending()) gtk_main_iteration(); + } +} + +GtkWidget *CpuDlg; +GtkWidget *PsxCombo; +GList *psxglist; +char *psxtypes[] = { + "NTSC", + "PAL" +}; + +void OnCpu_Ok() { + GtkWidget *Btn; + char *tmp; + long t; + + tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(PsxCombo)->entry)); + + if (!strcmp("NTSC",tmp)) Config.PsxType = 0; + else Config.PsxType = 1; // pal + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Xa"); + Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Sio"); + Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Mdec"); + Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cdda"); + Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxAuto"); + Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + t = Config.Cpu; + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cpu"); + Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + if (t != Config.Cpu) { + psxCpu->Shutdown(); + if (Config.Cpu) + psxCpu = &psxInt; + else psxCpu = &psxRec; + if (psxCpu->Init() == -1) { + SysClose(); + exit(1); + } + psxCpu->Reset(); + } + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_CpuLog"); + Config.Log = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxOut"); + Config.PsxOut = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_SpuIrq"); + Config.SpuIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_CdTiming"); + Config.CdTiming = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Btn)); + + gtk_widget_destroy(CpuDlg); + + SaveConfig(); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +void OnCpu_Cancel() { + gtk_widget_destroy(CpuDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + + +void OnConf_Cpu() { + GtkWidget *Btn; + int i; + + CpuDlg = create_CpuDlg(); + gtk_window_set_title(GTK_WINDOW(CpuDlg), "P©SX Configuration"); + + psxglist = NULL; + for (i=0;i<2;i++) + psxglist = g_list_append(psxglist, psxtypes[i]); + PsxCombo = lookup_widget(CpuDlg, "GtkCombo_PsxType"); + gtk_combo_set_popdown_strings(GTK_COMBO(PsxCombo), psxglist); + gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(PsxCombo)->entry), psxtypes[Config.PsxType]); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Xa"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Xa); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Sio"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Sio); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Mdec"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Mdec); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cdda"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Cdda); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxAuto"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.PsxAuto); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_Cpu"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Cpu); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_CpuLog"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.Log); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_PsxOut"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.PsxOut); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_SpuIrq"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.SpuIrq); + + Btn = lookup_widget(CpuDlg, "GtkCheckButton_CdTiming"); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(Btn), Config.CdTiming); + + gtk_widget_show_all(CpuDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); +} + +#define FindComboText(combo,list,conf) \ + if (strlen(conf) > 0) { \ + int i; \ + for (i=2;i<255;i+=2) { \ + if (!strcmp(conf, list[i-2])) { \ + gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), list[i-1]); \ + break; \ + } \ + } \ + } + +#define GetComboText(combo,list,conf) \ + { \ + int i; \ + char *tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry)); \ + for (i=2;i<255;i+=2) { \ + if (!strcmp(tmp, list[i-1])) { \ + strcpy(conf, list[i-2]); \ + break; \ + } \ + } \ + } + +void OnConfConf_Ok() { + GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu); + GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu); + GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr); + GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1); + GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2); + GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios); + + SaveConfig(); + + ReleasePlugins(); + LoadPlugins(); + + needreset = 1; + gtk_widget_destroy(ConfDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +void OnConfConf_Cancel() { + gtk_widget_destroy(ConfDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +#define ConfPlugin(src, confs, plugin, name) \ + void *drv; \ + src conf; \ + char file[256]; \ + \ + GetComboText(confs.Combo, confs.plist, plugin); \ + strcpy(file, Config.PluginsDir); \ + strcat(file, plugin); \ + gtk_widget_set_sensitive(ConfDlg, FALSE); \ + drv = SysLoadLibrary(file); \ + if (drv == NULL) return; \ + conf = (src) SysLoadSym(drv, name); \ + if (SysLibError() == NULL) conf(); \ + else SysMessage("Plugin doesn't needs to be configured"); \ + SysCloseLibrary(drv); \ + gtk_widget_set_sensitive(ConfDlg, TRUE); + +#define TestPlugin(src, confs, plugin, name) \ + void *drv; \ + src conf; \ + int ret = 0; \ + char file[256]; \ + \ + GetComboText(confs.Combo, confs.plist, plugin); \ + strcpy(file, Config.PluginsDir); \ + strcat(file, plugin); \ + gtk_widget_set_sensitive(ConfDlg, FALSE); \ + drv = SysLoadLibrary(file); \ + if (drv == NULL) return; \ + conf = (src) SysLoadSym(drv, name); \ + if (SysLibError() == NULL) ret = conf(); \ + SysCloseLibrary(drv); \ + SysMessage("This plugin reports that should %swork correctly", ret == 0 ? "" : "not "); \ + gtk_widget_set_sensitive(ConfDlg, TRUE); + +void OnConfConf_GpuConf() { + ConfPlugin(GPUconfigure, GpuConfS, Config.Gpu, "GPUconfigure"); +} + +void OnConfConf_GpuTest() { + TestPlugin(GPUtest, GpuConfS, Config.Gpu, "GPUtest"); +} + +void OnConfConf_GpuAbout() { + ConfPlugin(GPUabout, GpuConfS, Config.Gpu, "GPUabout"); +} + +void OnConfConf_SpuConf() { + ConfPlugin(SPUconfigure, SpuConfS, Config.Spu, "SPUconfigure"); +} + +void OnConfConf_SpuTest() { + TestPlugin(SPUtest, SpuConfS, Config.Spu, "SPUtest"); +} + +void OnConfConf_SpuAbout() { + ConfPlugin(SPUabout, SpuConfS, Config.Spu, "SPUabout"); +} + +void OnConfConf_CdrConf() { + ConfPlugin(CDRconfigure, CdrConfS, Config.Cdr, "CDRconfigure"); +} + +void OnConfConf_CdrTest() { + TestPlugin(CDRtest, CdrConfS, Config.Cdr, "CDRtest"); +} + +void OnConfConf_CdrAbout() { + ConfPlugin(CDRabout, CdrConfS, Config.Cdr, "CDRabout"); +} + +void OnConfConf_Pad1Conf() { + ConfPlugin(PADconfigure, Pad1ConfS, Config.Pad1, "PADconfigure"); +} + +void OnConfConf_Pad1Test() { + TestPlugin(PADtest, Pad1ConfS, Config.Pad1, "PADtest"); +} + +void OnConfConf_Pad1About() { + ConfPlugin(PADabout, Pad1ConfS, Config.Pad1, "PADabout"); +} + +void OnConfConf_Pad2Conf() { + ConfPlugin(PADconfigure, Pad2ConfS, Config.Pad2, "PADconfigure"); +} + +void OnConfConf_Pad2Test() { + TestPlugin(PADtest, Pad2ConfS, Config.Pad2, "PADtest"); +} + +void OnConfConf_Pad2About() { + ConfPlugin(PADabout, Pad2ConfS, Config.Pad2, "PADabout"); +} + +void OnPluginsPath_Ok() { + gchar *File; + + File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); + strcpy(Config.PluginsDir, File); + if (Config.PluginsDir[strlen(Config.PluginsDir)-1] != '/') + strcat(Config.PluginsDir, "/"); + + FindPlugins(); + + gtk_widget_destroy(FileSel); +} + +void OnPluginsPath_Cancel() { + gtk_widget_destroy(FileSel); +} + +void OnConfConf_PluginsPath() { + GtkWidget *Ok,*Cancel; + + FileSel = gtk_file_selection_new("Select Plugins Directory"); + + Ok = GTK_FILE_SELECTION(FileSel)->ok_button; + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Ok), NULL); + gtk_widget_show(Ok); + + Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; + gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnPluginsPath_Cancel), NULL); + gtk_widget_show(Cancel); + + gtk_widget_show(FileSel); + gdk_window_raise(FileSel->window); +} + +void OnBiosPath_Ok() { + gchar *File; + + File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); + strcpy(Config.BiosDir, File); + if (Config.BiosDir[strlen(Config.BiosDir)-1] != '/') + strcat(Config.BiosDir, "/"); + + FindPlugins(); + + gtk_widget_destroy(FileSel); +} + +void OnBiosPath_Cancel() { + gtk_widget_destroy(FileSel); +} + +void OnConfConf_BiosPath() { + GtkWidget *Ok,*Cancel; + + FileSel = gtk_file_selection_new("Select Bios Directory"); + + Ok = GTK_FILE_SELECTION(FileSel)->ok_button; + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Ok), NULL); + gtk_widget_show(Ok); + + Cancel = GTK_FILE_SELECTION(FileSel)->cancel_button; + gtk_signal_connect (GTK_OBJECT(Cancel), "clicked", GTK_SIGNAL_FUNC(OnBiosPath_Cancel), NULL); + gtk_widget_show(Cancel); + + gtk_widget_show(FileSel); + gdk_window_raise(FileSel->window); +} + +void OnConf_Conf() { + ConfDlg = create_ConfDlg(); + gtk_window_set_title(GTK_WINDOW(ConfDlg), "P©SX Configuration"); + + FindPlugins(); + + gtk_widget_show_all(ConfDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); +} + +void OnDebug() { + DebugDlg = create_DebugDlg(); + gtk_widget_show_all(DebugDlg); + + if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); +} + +void OnDebug_Ok() { + gtk_widget_destroy(DebugDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +void OnHelp_Help() { +} + +void OnHelpAbout_Ok() { + gtk_widget_destroy(AboutDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, TRUE); + gtk_main_quit(); +} + +void OnHelp_About() { + GtkWidget *Label; + + AboutDlg = create_AboutDlg(); + gtk_window_set_title(GTK_WINDOW(AboutDlg), "About P©SX"); + + Label = lookup_widget(AboutDlg, "GtkAbout_LabelVersion"); + gtk_label_set_text(GTK_LABEL(Label), + "P©SX For Linux\n" + "Version " PCSX_VERSION); + + Label = lookup_widget(AboutDlg, "GtkAbout_LabelAuthors"); + gtk_label_set_text(GTK_LABEL(Label), + "PCSX a psx emulator\n\n" + "written by:\n" + "main coder: linuzappz\n" + "co-coders: shadow\n" + "ex-coders: Nocomp, Pete Bernett, nik3d\n" + "Webmaster: AkumaX"); + + Label = lookup_widget(AboutDlg, "GtkAbout_LabelGreets"); + gtk_label_set_text(GTK_LABEL(Label), + "Greets to: Duddie, Tratax, Kazzuya, JNS, Bobbi, Psychojak and Shunt\n" + "Special thanks to:\n" + "Twin (we Love you twin0r), Roor (love for you too),\n" + "calb (Thanks for help :) ), now3d (for great help to my psxdev stuff :) )"); + + gtk_widget_show_all(AboutDlg); + if (Window != NULL) gtk_widget_set_sensitive(Window, FALSE); + gtk_main(); +} + +#define ComboAddPlugin(type) { \ + ##type##ConfS.plugins+=2; \ + strcpy(##type##ConfS.plist[##type##ConfS.plugins-1], name); \ + strcpy(##type##ConfS.plist[##type##ConfS.plugins-2], ent->d_name); \ + ##type##ConfS.glist = g_list_append(##type##ConfS.glist, ##type##ConfS.plist[##type##ConfS.plugins-1]); \ +} + +#define ConfCreatePConf(name, type) \ + if (type##ConfS.glist != NULL) { \ + type##ConfS.Combo = lookup_widget(ConfDlg, "GtkCombo_" name); \ + gtk_combo_set_popdown_strings(GTK_COMBO(type##ConfS.Combo), type##ConfS.glist); \ + FindComboText(type##ConfS.Combo, type##ConfS.plist, Config.##type##); \ + } + +void FindPlugins() { + DIR *dir; + struct dirent *ent; + void *Handle; + char plugin[256],name[256]; + + GpuConfS.plugins = 0; SpuConfS.plugins = 0; CdrConfS.plugins = 0; + Pad1ConfS.plugins = 0; Pad2ConfS.plugins = 0; BiosConfS.plugins = 0; + GpuConfS.glist = NULL; SpuConfS.glist = NULL; CdrConfS.glist = NULL; + Pad1ConfS.glist = NULL; Pad2ConfS.glist = NULL; BiosConfS.glist = NULL; + + dir = opendir(Config.PluginsDir); + if (dir == NULL) { + SysMessage("Could not open '%s' directory\n", Config.PluginsDir); + return; + } + while ((ent = readdir(dir)) != NULL) { + long type,v; + + sprintf(plugin, "%s%s", Config.PluginsDir, ent->d_name); + + if (strstr(plugin, ".so") == NULL) continue; + Handle = dlopen(plugin, RTLD_NOW); + if (Handle == NULL) continue; + + PSE_getLibType = (PSEgetLibType) dlsym(Handle, "PSEgetLibType"); + if (dlerror() != NULL) { + if (strstr(plugin, "gpu") != NULL) type = PSE_LT_GPU; + else if (strstr(plugin, "cdr") != NULL) type = PSE_LT_CDR; + else if (strstr(plugin, "spu") != NULL) type = PSE_LT_SPU; + else if (strstr(plugin, "pad") != NULL) type = PSE_LT_PAD; + else continue; + } + else type = PSE_getLibType(); + + PSE_getLibName = (PSEgetLibName) dlsym(Handle, "PSEgetLibName"); + if (dlerror() == NULL) { + sprintf(name, "%s", PSE_getLibName()); + PSE_getLibVersion = (PSEgetLibVersion) dlsym(Handle, "PSEgetLibVersion"); + if (dlerror() == NULL) { + char ver[32]; + + v = PSE_getLibVersion(); + sprintf(ver, " %ld.%ld.%ld",v>>16,(v>>8)&0xff,v&0xff); + strcat(name, ver); + } + } + else strcpy(name, ent->d_name); + + if (type & PSE_LT_CDR) { + ComboAddPlugin(Cdr); + } + if (type & PSE_LT_GPU) { + ComboAddPlugin(Gpu); + } + if (type & PSE_LT_SPU) { + ComboAddPlugin(Spu); + } + if (type & PSE_LT_PAD) { + PADquery query = (PADquery)dlsym(Handle, "PADquery"); + if (query() & 0x1) { + ComboAddPlugin(Pad1); + } + if (query() & 0x2) { + ComboAddPlugin(Pad2); + } + } + } + closedir(dir); + + ConfCreatePConf("Gpu", Gpu); + ConfCreatePConf("Spu", Spu); + ConfCreatePConf("Pad1", Pad1); + ConfCreatePConf("Pad2", Pad2); + ConfCreatePConf("Cdr", Cdr); + + BiosConfS.plugins+=2; + strcpy(BiosConfS.plist[BiosConfS.plugins-1], "Internal HLE Bios"); + strcpy(BiosConfS.plist[BiosConfS.plugins-2], "HLE"); + BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins-1]); + + dir = opendir(Config.BiosDir); + if (dir == NULL) { + SysMessage("Could not open '%s' directory\n", Config.BiosDir); + return; + } + + while ((ent = readdir(dir)) != NULL) { + struct stat buf; + + sprintf (plugin, "%s%s", Config.BiosDir, ent->d_name); + if (stat(plugin, &buf) == -1) continue; + if (buf.st_size != (1024*512)) continue; + + BiosConfS.plugins+=2; + strcpy(BiosConfS.plist[BiosConfS.plugins-1], ent->d_name); + strcpy(BiosConfS.plist[BiosConfS.plugins-2], ent->d_name); + BiosConfS.glist = g_list_append(BiosConfS.glist, BiosConfS.plist[BiosConfS.plugins-1]); + } + closedir(dir); + + ConfCreatePConf("Bios", Bios); +} + +GtkWidget *MsgDlg; + +void OnMsg_Ok() { + gtk_widget_destroy(MsgDlg); + gtk_main_quit(); +} + +void SysMessage(char *fmt, ...) { + GtkWidget *Ok,*Txt; + GtkWidget *Box,*Box1; + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; + + if (!UseGui) { printf ("%s\n",msg); return; } + + MsgDlg = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); + gtk_window_set_title(GTK_WINDOW(MsgDlg), "P©SX Msg"); + gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5); + + Box = gtk_vbox_new(5, 0); + gtk_container_add(GTK_CONTAINER(MsgDlg), Box); + gtk_widget_show(Box); + + Txt = gtk_label_new(msg); + + gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); + gtk_widget_show(Txt); + + Box1 = gtk_hbutton_box_new(); + gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); + gtk_widget_show(Box1); + + Ok = gtk_button_new_with_label("Ok"); + gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); + gtk_container_add(GTK_CONTAINER(Box1), Ok); + GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); + gtk_widget_show(Ok); + + gtk_widget_show(MsgDlg); + + gtk_main(); +} + diff --git a/PcsxSrc/Linux/Linux.h b/PcsxSrc/Linux/Linux.h index 57a0d8c..581e008 100644 --- a/PcsxSrc/Linux/Linux.h +++ b/PcsxSrc/Linux/Linux.h @@ -1,39 +1,39 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __LINUX_H__ -#define __LINUX_H__ - -#include "PsxCommon.h" -#include "Plugin.h" - -extern int UseGui; -char cfgfile[256]; - -int LoadConfig(); -void SaveConfig(); - -void StartGui(); -void RunGui(); - -void ConfigurePlugins(); -void ConfigureMemcards(); - -void PADhandleKey(int key); - -#endif /* __LINUX_H__ */ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __LINUX_H__ +#define __LINUX_H__ + +#include "PsxCommon.h" +#include "Plugin.h" + +extern int UseGui; +char cfgfile[256]; + +int LoadConfig(); +void SaveConfig(); + +void StartGui(); +void RunGui(); + +void ConfigurePlugins(); +void ConfigureMemcards(); + +void PADhandleKey(int key); + +#endif /* __LINUX_H__ */ diff --git a/PcsxSrc/Linux/LnxMain.c b/PcsxSrc/Linux/LnxMain.c index e0012f6..ff3e065 100644 --- a/PcsxSrc/Linux/LnxMain.c +++ b/PcsxSrc/Linux/LnxMain.c @@ -1,197 +1,197 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Linux.h" -#include "Sio.h" - -static char PcsxHelp[] = { - "Pcsx " PCSX_VERSION "\n" - " pcsx [options] [file]\n" - "\toptions:\n" - "\t-runcd\t\tRuns CdRom\n" - "\t-runcdbios\tRuns CdRom Through Bios\n" - "\t-nogui\t\tDon't open GtkGui\n" - "\t-cfg FILE\tLoads desired configuration file (def:Pcsx.cfg)\n" - "\t-psxout\t\tEnable psx output\n" - "\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" - "\t-h -help\tThis help\n" - "\tfile\t\tLoads file\n" -}; - -int UseGui = 1; - -int main(int argc, char *argv[]) { - char *file = NULL; - int runcd = 0; - int loadst = 0; - int i; - - strcpy(cfgfile, "Pcsx.cfg"); - - for (i=1; iExecute(); - - return 0; -} - -int SysInit() { - -#ifdef GTE_DUMP - gteLog = fopen("gteLog.txt","wb"); - setvbuf(gteLog, NULL, _IONBF, 0); -#endif - -#ifdef EMU_LOG -#ifndef LOG_STDOUT - emuLog = fopen("emuLog.txt","wb"); -#else - emuLog = stdout; -#endif - setvbuf(emuLog, NULL, _IONBF, 0); -#endif - - psxInit(); - - LoadPlugins(); - LoadMcds(Config.Mcd1, Config.Mcd2); - - return 0; -} - -void SysReset() { - psxReset(); -} - -void SysClose() { - psxShutdown(); - ReleasePlugins(); - - if (emuLog != NULL) fclose(emuLog); -} - -void SysPrintf(char *fmt, ...) { - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (Config.PsxOut) printf ("%s", msg); -#ifdef EMU_LOG - fprintf(emuLog, "%s", msg); -#endif -} - -void *SysLoadLibrary(char *lib) { - return dlopen(lib, RTLD_NOW); -} - -void *SysLoadSym(void *lib, char *sym) { - return dlsym(lib, sym); -} - -char *SysLibError() { - return dlerror(); -} - -void SysCloseLibrary(void *lib) { - dlclose(lib); -} - -void SysUpdate() { - PADhandleKey(PAD1_keypressed()); - PADhandleKey(PAD2_keypressed()); -} - -void SysRunGui() { - RunGui(); +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Linux.h" +#include "Sio.h" + +static char PcsxHelp[] = { + "Pcsx " PCSX_VERSION "\n" + " pcsx [options] [file]\n" + "\toptions:\n" + "\t-runcd\t\tRuns CdRom\n" + "\t-runcdbios\tRuns CdRom Through Bios\n" + "\t-nogui\t\tDon't open GtkGui\n" + "\t-cfg FILE\tLoads desired configuration file (def:Pcsx.cfg)\n" + "\t-psxout\t\tEnable psx output\n" + "\t-load STATENUM\tLoads savestate STATENUM (1-5)\n" + "\t-h -help\tThis help\n" + "\tfile\t\tLoads file\n" +}; + +int UseGui = 1; + +int main(int argc, char *argv[]) { + char *file = NULL; + int runcd = 0; + int loadst = 0; + int i; + + strcpy(cfgfile, "Pcsx.cfg"); + + for (i=1; iExecute(); + + return 0; +} + +int SysInit() { + +#ifdef GTE_DUMP + gteLog = fopen("gteLog.txt","wb"); + setvbuf(gteLog, NULL, _IONBF, 0); +#endif + +#ifdef EMU_LOG +#ifndef LOG_STDOUT + emuLog = fopen("emuLog.txt","wb"); +#else + emuLog = stdout; +#endif + setvbuf(emuLog, NULL, _IONBF, 0); +#endif + + psxInit(); + + LoadPlugins(); + LoadMcds(Config.Mcd1, Config.Mcd2); + + return 0; +} + +void SysReset() { + psxReset(); +} + +void SysClose() { + psxShutdown(); + ReleasePlugins(); + + if (emuLog != NULL) fclose(emuLog); +} + +void SysPrintf(char *fmt, ...) { + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (Config.PsxOut) printf ("%s", msg); +#ifdef EMU_LOG + fprintf(emuLog, "%s", msg); +#endif +} + +void *SysLoadLibrary(char *lib) { + return dlopen(lib, RTLD_NOW); +} + +void *SysLoadSym(void *lib, char *sym) { + return dlsym(lib, sym); +} + +char *SysLibError() { + return dlerror(); +} + +void SysCloseLibrary(void *lib) { + dlclose(lib); +} + +void SysUpdate() { + PADhandleKey(PAD1_keypressed()); + PADhandleKey(PAD2_keypressed()); +} + +void SysRunGui() { + RunGui(); } \ No newline at end of file diff --git a/PcsxSrc/Linux/Plugin.c b/PcsxSrc/Linux/Plugin.c index c305950..a1cbb2b 100644 --- a/PcsxSrc/Linux/Plugin.c +++ b/PcsxSrc/Linux/Plugin.c @@ -1,208 +1,208 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include "Linux.h" -#include "plugins.h" -#include "Spu.h" - -void RunGui(); -void OnFile_Exit(); - -extern GPUopen GPU_open; - -unsigned long gpuDisp; - -extern CDRplay CDR_play; -extern CDRstop CDR_stop; - -extern SPUopen SPU_open; - -long SPU__open(void) { - return SPU_open(); -} - -extern PADopen PAD1_open; -extern PADreadPort1 PAD1_readPort1; -extern PADopen PAD2_open; -extern PADreadPort2 PAD2_readPort2; - -int StatesC = 0; -extern char CdromId[256]; -extern int UseGui; -int cdOpenCase = 0; - -void PADhandleKey(int key) { - char Text[255]; - int ret; - - switch (key) { - case 0: break; - case XK_F1: - sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); - GPU_freeze(2, (GPUFreeze_t *)&StatesC); - ret = SaveState(Text); - sprintf (Text, "*PCSX*: %s State %d", !ret ? "Saved" : "Error Saving", StatesC+1); - GPU_displayText(Text); - break; - case XK_F2: - if (StatesC < 4) StatesC++; - else StatesC = 0; - GPU_freeze(2, (GPUFreeze_t *)&StatesC); - break; - case XK_F3: - sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); - ret = LoadState(Text); - sprintf (Text, "*PCSX*: %s State %d", !ret ? "Loaded" : "Error Loading", StatesC+1); - GPU_displayText(Text); - break; - case XK_F4: - { - gzFile f; - static int ShowPic; - - if (!ShowPic) { - unsigned char *pMem; - - sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); - f = gzopen(Text, "rb"); - if (f == NULL) break; - - gzseek(f, 32, SEEK_SET); // skip header - - pMem = (unsigned char *) malloc(128*96*3); - gzread(f, pMem, 128*96*3); - gzclose(f); - GPU_freeze(2, (GPUFreeze_t *)&StatesC); - GPU_showScreenPic(pMem); - free(pMem); - ShowPic = 1; - } - else { GPU_showScreenPic(NULL); ShowPic = 0; } - } - break; - case XK_F5: - Config.Sio ^= 0x1; - sprintf (Text, "*PCSX*: Sio Irq %sAlways Enabled", Config.Sio ? "" : "Not "); - GPU_displayText(Text); - break; - case XK_F6: - Config.Mdec ^= 0x1; - sprintf (Text, "*PCSX*: Black&White Mdecs Only %sabled", Config.Mdec ? "En" : "Dis"); - GPU_displayText(Text); - break; - case XK_F7: - Config.Xa ^= 0x1; - sprintf (Text, "*PCSX*: Xa %sabled", !Config.Xa ? "En" : "Dis"); - GPU_displayText(Text); - break; - case XK_F8: - GPU_makeSnapshot(); - break; - case XK_F9: - cdOpenCase = 1; - break; - case XK_F10: - cdOpenCase = 0; - break; - case XK_Escape: - ClosePlugins(); - if (!UseGui) OnFile_Exit(); - RunGui(); - break; - default: GPU_keypressed(key); - } -} - -long PAD1__open(void) { - return PAD1_open(&gpuDisp); -} - -long PAD2__open(void) { - return PAD2_open(&gpuDisp); -} - -void OnFile_Exit(); - -void SignalExit(int sig) { - ClosePlugins(); - OnFile_Exit(); -} - -void SPUirq(void); - -void OpenPlugins() { - int ret; - - signal(SIGINT, SignalExit); - signal(SIGPIPE, SignalExit); - ret = CDR_open(); - if (ret != 0) { SysMessage ("Error Opening CDR Plugin\n"); exit(1); } - ret = SPU_open(); - if (ret != 0) { SysMessage ("Error Opening SPU Plugin\n"); exit(1); } - SPU_registerCallback(SPUirq); - ret = GPU_open(&gpuDisp, "P©SX", NULL); - if (ret != 0) { SysMessage ("Error Opening GPU Plugin\n"); exit(1); } - ret = PAD1_open(&gpuDisp); - if (ret != 0) { SysMessage ("Error Opening PAD1 Plugin\n"); exit(1); } - ret = PAD2_open(&gpuDisp); - if (ret != 0) { SysMessage ("Error Opening PAD2 Plugin\n"); exit(1); } -} - -void ClosePlugins() { - int ret; - - signal(SIGINT, SIG_DFL); - signal(SIGPIPE, SIG_DFL); - ret = CDR_close(); - if (ret != 0) { SysMessage ("Error Closing CDR Plugin\n"); exit(1); } - ret = SPU_close(); - if (ret != 0) { SysMessage ("Error Closing SPU Plugin\n"); exit(1); } - ret = PAD1_close(); - if (ret != 0) { SysMessage ("Error Closing PAD1 Plugin\n"); exit(1); } - ret = PAD2_close(); - if (ret != 0) { SysMessage ("Error Closing PAD2 Plugin\n"); exit(1); } - ret = GPU_close(); - if (ret != 0) { SysMessage ("Error Closing GPU Plugin\n"); exit(1); } -} - -void ResetPlugins() { - int ret; - - CDR_shutdown(); - GPU_shutdown(); - SPU_shutdown(); - PAD1_shutdown(); - PAD2_shutdown(); - - ret = CDR_init(); - if (ret != 0) { SysMessage ("CDRinit error : %d\n",ret); exit(1); } - ret = GPU_init(); - if (ret != 0) { SysMessage ("GPUinit error : %d\n",ret); exit(1); } - ret = SPU_init(); - if (ret != 0) { SysMessage ("SPUinit error : %d\n",ret); exit(1); } - ret = PAD1_init(1); - if (ret != 0) { SysMessage ("PAD1init error : %d\n",ret); exit(1); } - ret = PAD2_init(2); - if (ret != 0) { SysMessage ("PAD2init error : %d\n",ret); exit(1); } -} +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +#include "Linux.h" +#include "plugins.h" +#include "Spu.h" + +void RunGui(); +void OnFile_Exit(); + +extern GPUopen GPU_open; + +unsigned long gpuDisp; + +extern CDRplay CDR_play; +extern CDRstop CDR_stop; + +extern SPUopen SPU_open; + +long SPU__open(void) { + return SPU_open(); +} + +extern PADopen PAD1_open; +extern PADreadPort1 PAD1_readPort1; +extern PADopen PAD2_open; +extern PADreadPort2 PAD2_readPort2; + +int StatesC = 0; +extern char CdromId[256]; +extern int UseGui; +int cdOpenCase = 0; + +void PADhandleKey(int key) { + char Text[255]; + int ret; + + switch (key) { + case 0: break; + case XK_F1: + sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + ret = SaveState(Text); + sprintf (Text, "*PCSX*: %s State %d", !ret ? "Saved" : "Error Saving", StatesC+1); + GPU_displayText(Text); + break; + case XK_F2: + if (StatesC < 4) StatesC++; + else StatesC = 0; + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + break; + case XK_F3: + sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); + ret = LoadState(Text); + sprintf (Text, "*PCSX*: %s State %d", !ret ? "Loaded" : "Error Loading", StatesC+1); + GPU_displayText(Text); + break; + case XK_F4: + { + gzFile f; + static int ShowPic; + + if (!ShowPic) { + unsigned char *pMem; + + sprintf (Text, "sstates/%s.%3.3d", CdromId, StatesC); + f = gzopen(Text, "rb"); + if (f == NULL) break; + + gzseek(f, 32, SEEK_SET); // skip header + + pMem = (unsigned char *) malloc(128*96*3); + gzread(f, pMem, 128*96*3); + gzclose(f); + GPU_freeze(2, (GPUFreeze_t *)&StatesC); + GPU_showScreenPic(pMem); + free(pMem); + ShowPic = 1; + } + else { GPU_showScreenPic(NULL); ShowPic = 0; } + } + break; + case XK_F5: + Config.Sio ^= 0x1; + sprintf (Text, "*PCSX*: Sio Irq %sAlways Enabled", Config.Sio ? "" : "Not "); + GPU_displayText(Text); + break; + case XK_F6: + Config.Mdec ^= 0x1; + sprintf (Text, "*PCSX*: Black&White Mdecs Only %sabled", Config.Mdec ? "En" : "Dis"); + GPU_displayText(Text); + break; + case XK_F7: + Config.Xa ^= 0x1; + sprintf (Text, "*PCSX*: Xa %sabled", !Config.Xa ? "En" : "Dis"); + GPU_displayText(Text); + break; + case XK_F8: + GPU_makeSnapshot(); + break; + case XK_F9: + cdOpenCase = 1; + break; + case XK_F10: + cdOpenCase = 0; + break; + case XK_Escape: + ClosePlugins(); + if (!UseGui) OnFile_Exit(); + RunGui(); + break; + default: GPU_keypressed(key); + } +} + +long PAD1__open(void) { + return PAD1_open(&gpuDisp); +} + +long PAD2__open(void) { + return PAD2_open(&gpuDisp); +} + +void OnFile_Exit(); + +void SignalExit(int sig) { + ClosePlugins(); + OnFile_Exit(); +} + +void SPUirq(void); + +void OpenPlugins() { + int ret; + + signal(SIGINT, SignalExit); + signal(SIGPIPE, SignalExit); + ret = CDR_open(); + if (ret != 0) { SysMessage ("Error Opening CDR Plugin\n"); exit(1); } + ret = SPU_open(); + if (ret != 0) { SysMessage ("Error Opening SPU Plugin\n"); exit(1); } + SPU_registerCallback(SPUirq); + ret = GPU_open(&gpuDisp, "P©SX", NULL); + if (ret != 0) { SysMessage ("Error Opening GPU Plugin\n"); exit(1); } + ret = PAD1_open(&gpuDisp); + if (ret != 0) { SysMessage ("Error Opening PAD1 Plugin\n"); exit(1); } + ret = PAD2_open(&gpuDisp); + if (ret != 0) { SysMessage ("Error Opening PAD2 Plugin\n"); exit(1); } +} + +void ClosePlugins() { + int ret; + + signal(SIGINT, SIG_DFL); + signal(SIGPIPE, SIG_DFL); + ret = CDR_close(); + if (ret != 0) { SysMessage ("Error Closing CDR Plugin\n"); exit(1); } + ret = SPU_close(); + if (ret != 0) { SysMessage ("Error Closing SPU Plugin\n"); exit(1); } + ret = PAD1_close(); + if (ret != 0) { SysMessage ("Error Closing PAD1 Plugin\n"); exit(1); } + ret = PAD2_close(); + if (ret != 0) { SysMessage ("Error Closing PAD2 Plugin\n"); exit(1); } + ret = GPU_close(); + if (ret != 0) { SysMessage ("Error Closing GPU Plugin\n"); exit(1); } +} + +void ResetPlugins() { + int ret; + + CDR_shutdown(); + GPU_shutdown(); + SPU_shutdown(); + PAD1_shutdown(); + PAD2_shutdown(); + + ret = CDR_init(); + if (ret != 0) { SysMessage ("CDRinit error : %d\n",ret); exit(1); } + ret = GPU_init(); + if (ret != 0) { SysMessage ("GPUinit error : %d\n",ret); exit(1); } + ret = SPU_init(); + if (ret != 0) { SysMessage ("SPUinit error : %d\n",ret); exit(1); } + ret = PAD1_init(1); + if (ret != 0) { SysMessage ("PAD1init error : %d\n",ret); exit(1); } + ret = PAD2_init(2); + if (ret != 0) { SysMessage ("PAD2init error : %d\n",ret); exit(1); } +} diff --git a/PcsxSrc/Linux/Plugin.h b/PcsxSrc/Linux/Plugin.h index ddda195..8d39e64 100644 --- a/PcsxSrc/Linux/Plugin.h +++ b/PcsxSrc/Linux/Plugin.h @@ -1,38 +1,38 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -// Linux Specifyc Plugin Functions - -#ifndef __PLUGIN_H__ -#define __PLUGIN_H__ - -typedef long (* GPUopen)(unsigned long *, char *, char *); - -long GPU__open(void); - -typedef long (* SPUopen)(void); - -long SPU__open(void); - -typedef long (* PADopen)(unsigned long *); - -long PAD1__open(void); - -long PAD2__open(void); - -#endif /* __PLUGIN_H__ */ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// Linux Specifyc Plugin Functions + +#ifndef __PLUGIN_H__ +#define __PLUGIN_H__ + +typedef long (* GPUopen)(unsigned long *, char *, char *); + +long GPU__open(void); + +typedef long (* SPUopen)(void); + +long SPU__open(void); + +typedef long (* PADopen)(unsigned long *); + +long PAD1__open(void); + +long PAD2__open(void); + +#endif /* __PLUGIN_H__ */ -- cgit v1.2.3