diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-12 03:03:58 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-12 03:03:58 +0000 |
| commit | 0169e4968d17823b71c52961c52417ea8057130c (patch) | |
| tree | feae8d106164c1fbd43ddf9e7adc4ff4a3f70e84 /libpcsxcore | |
| parent | 34b2030516e8fcab81affc1e11a9b2f1a61761e4 (diff) | |
| download | pcsxr-0169e4968d17823b71c52961c52417ea8057130c.tar.gz | |
use boolean for where it should.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@47869 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
| -rw-r--r-- | libpcsxcore/misc.c | 8 | ||||
| -rw-r--r-- | libpcsxcore/plugins.c | 6 | ||||
| -rw-r--r-- | libpcsxcore/psxcommon.h | 38 | ||||
| -rw-r--r-- | libpcsxcore/psxmem.c | 8 | ||||
| -rw-r--r-- | libpcsxcore/r3000a.c | 2 |
5 files changed, 30 insertions, 32 deletions
diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 4d93cf29..439bde10 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -332,8 +332,8 @@ int CheckCdrom() { if (Config.PsxAuto) { // autodetect system (pal or ntsc) if (strstr(exename, "ES") != NULL) - Config.PsxType = 1; // pal - else Config.PsxType = 0; // ntsc + Config.PsxType = PSX_TYPE_PAL; // pal + else Config.PsxType = PSX_TYPE_NTSC; // ntsc } if (CdromLabel[0] == ' ') { @@ -619,7 +619,6 @@ int RecvPcsxInfo() { NET_recvData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); NET_recvData(&Config.RCntFix, sizeof(Config.RCntFix), PSE_NET_BLOCKING); NET_recvData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); - //psxUpdateVSyncRate(); SysUpdate(); @@ -628,8 +627,7 @@ int RecvPcsxInfo() { if (tmp != Config.Cpu) { psxCpu->Shutdown(); #ifdef PSXREC - if (Config.Cpu) - psxCpu = &psxInt; + if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; else psxCpu = &psxRec; #else psxCpu = &psxInt; diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 59d14bb6..90db0961 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -480,11 +480,11 @@ int LoadPlugins() { if (LoadPAD2plugin(Plugin) == -1) return -1;
if (strcmp("Disabled", Config.Net) == 0 || strcmp("", Config.Net) == 0)
- Config.UseNet = 0;
+ Config.UseNet = FALSE;
else {
- Config.UseNet = 1;
+ Config.UseNet = TRUE;
sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Net);
- if (LoadNETplugin(Plugin) == -1) Config.UseNet = 0;
+ if (LoadNETplugin(Plugin) == -1) Config.UseNet = FALSE;
}
ret = CDR_init();
diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index f37a2520..fb0cb7ec 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -114,20 +114,20 @@ typedef struct { char BiosDir[MAXPATHLEN]; char PluginsDir[MAXPATHLEN]; char PatchesDir[MAXPATHLEN]; - long Xa; - long Sio; - long Mdec; - long PsxAuto; + boolean Xa; + boolean Sio; + boolean Mdec; + boolean PsxAuto; + boolean Cdda; + boolean HLE; + boolean Debug; + boolean PsxOut; + boolean SpuIrq; + boolean RCntFix; + boolean UseNet; + boolean VSyncWA; + long Cpu; // CPU_DYNAREC or CPU_INTERPRETER long PsxType; // PSX_TYPE_NTSC or PSX_TYPE_PAL - long Cdda; - long HLE; - long Cpu; - long Debug; - long PsxOut; - long SpuIrq; - long RCntFix; - long UseNet; - long VSyncWA; #ifdef _WIN32 char Lang[256]; #endif @@ -145,14 +145,14 @@ extern boolean NetOpened; #define PSXCLK 33868800 /* 33.8688 Mhz */ enum { - BIOS_USER_DEFINED = 0, - BIOS_HLE -}; // BIOS Types - -enum { PSX_TYPE_NTSC = 0, PSX_TYPE_PAL -}; // PSX Type +}; // PSX Types + +enum { + CPU_DYNAREC = 0, + CPU_INTERPRETER +}; // CPU Types int EmuInit(); void EmuReset(); diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index ff053ca9..2f6f7409 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -111,15 +111,15 @@ void psxMemReset() { f = fopen(bios, "rb"); if (f == NULL) { - SysMessage (_("Could not open BIOS:\"%s\". Enabling HLE Bios!\n"), bios); + SysMessage(_("Could not open BIOS:\"%s\". Enabling HLE Bios!\n"), bios); memset(psxR, 0, 0x80000); - Config.HLE = BIOS_HLE; + Config.HLE = TRUE; } else { fread(psxR, 1, 0x80000, f); fclose(f); - Config.HLE = BIOS_USER_DEFINED; + Config.HLE = FALSE; } - } else Config.HLE = BIOS_HLE; + } else Config.HLE = TRUE; } void psxMemShutdown() { diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index b569e5d7..d8b3255a 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -33,7 +33,7 @@ int psxInit() { SysPrintf(_("Running PCSX Version %s (%s).\n"), PACKAGE_VERSION, __DATE__); #ifdef PSXREC - if (Config.Cpu) { + if (Config.Cpu == CPU_INTERPRETER) { psxCpu = &psxInt; } else psxCpu = &psxRec; #else |
