- revert some part to r4771;
This commit is contained in:
parent
7d6b1db97b
commit
fcb8551d4f
|
@ -249,7 +249,7 @@ bool CFIRMWARE::load()
|
||||||
|
|
||||||
if (CommonSettings.UseExtFirmware == false)
|
if (CommonSettings.UseExtFirmware == false)
|
||||||
return false;
|
return false;
|
||||||
if (CommonSettings.Firmware[0] == 0)
|
if (strlen(CommonSettings.Firmware) == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
FILE *fp = fopen(CommonSettings.Firmware, "rb");
|
FILE *fp = fopen(CommonSettings.Firmware, "rb");
|
||||||
|
|
|
@ -193,7 +193,7 @@ public:
|
||||||
|
|
||||||
void ReadPathSettings()
|
void ReadPathSettings()
|
||||||
{
|
{
|
||||||
if (pathToModule[0] == 0)
|
if( ( strcmp(pathToModule, "") == 0) || !pathToModule)
|
||||||
LoadModulePath();
|
LoadModulePath();
|
||||||
|
|
||||||
ReadKey(pathToRoms, ROMKEY);
|
ReadKey(pathToRoms, ROMKEY);
|
||||||
|
|
|
@ -645,7 +645,7 @@ public:
|
||||||
{
|
{
|
||||||
u16 c = map[x];
|
u16 c = map[x];
|
||||||
int alpha = ((c&0x8000)?opaqueColor:0);
|
int alpha = ((c&0x8000)?opaqueColor:0);
|
||||||
*dwdst++ = CONVERT(c,alpha);
|
*dwdst++ = CONVERT(c&0x7FFF,alpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,7 +48,7 @@ static u8 searchAddSize = 0;
|
||||||
static const char* searchAddDesc = 0;
|
static const char* searchAddDesc = 0;
|
||||||
static char editBuf[3][75] = { 0 };
|
static char editBuf[3][75] = { 0 };
|
||||||
static u32 cheatEditPos = 0;
|
static u32 cheatEditPos = 0;
|
||||||
static bool cheatAddPasteCheck = false;
|
static u8 cheatAddPasteCheck = 0;
|
||||||
static u8 cheatXXtype = 0;
|
static u8 cheatXXtype = 0;
|
||||||
static u8 cheatXXaction = 0;
|
static u8 cheatXXaction = 0;
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ INT_PTR CALLBACK CheatsAddProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam
|
||||||
|
|
||||||
if(cheatAddPasteCheck)
|
if(cheatAddPasteCheck)
|
||||||
{
|
{
|
||||||
cheatAddPasteCheck = false;
|
cheatAddPasteCheck = 0;
|
||||||
char temp [12];
|
char temp [12];
|
||||||
sprintf(temp, "%06X", val);
|
sprintf(temp, "%06X", val);
|
||||||
if(strcmp(editBuf[0], temp))
|
if(strcmp(editBuf[0], temp))
|
||||||
|
@ -297,7 +297,7 @@ INT_PTR CALLBACK CheatsAddProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam
|
||||||
|
|
||||||
if(cheatAddPasteCheck || parseOffset)
|
if(cheatAddPasteCheck || parseOffset)
|
||||||
{
|
{
|
||||||
cheatAddPasteCheck = false;
|
cheatAddPasteCheck = 0;
|
||||||
val &= searchRange[searchAddSize][1];
|
val &= searchRange[searchAddSize][1];
|
||||||
char temp [12];
|
char temp [12];
|
||||||
sprintf(temp, "%u", val);
|
sprintf(temp, "%u", val);
|
||||||
|
@ -374,8 +374,8 @@ INT_PTR CALLBACK CheatsEditProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lpara
|
||||||
|
|
||||||
cheats->get(&tempCheat, cheatEditPos);
|
cheats->get(&tempCheat, cheatEditPos);
|
||||||
|
|
||||||
memset(&buf[0], 0, sizeof(buf));
|
memset(buf, 0, 100);
|
||||||
memset(&buf2[0], 0, sizeof(buf2));
|
memset(buf2, 0, 100);
|
||||||
tempCheat.code[0][0] &= 0x00FFFFFF;
|
tempCheat.code[0][0] &= 0x00FFFFFF;
|
||||||
wsprintf(buf, "%06X", tempCheat.code[0][0]);
|
wsprintf(buf, "%06X", tempCheat.code[0][0]);
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_EDIT1), buf);
|
SetWindowText(GetDlgItem(dialog, IDC_EDIT1), buf);
|
||||||
|
@ -443,7 +443,7 @@ INT_PTR CALLBACK CheatsEditProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lpara
|
||||||
|
|
||||||
if(cheatAddPasteCheck || parseOffset)
|
if(cheatAddPasteCheck || parseOffset)
|
||||||
{
|
{
|
||||||
cheatAddPasteCheck = false;
|
cheatAddPasteCheck = 0;
|
||||||
val &= searchRange[tempCheat.size][1];
|
val &= searchRange[tempCheat.size][1];
|
||||||
char temp [12];
|
char temp [12];
|
||||||
sprintf(temp, "%u", val);
|
sprintf(temp, "%u", val);
|
||||||
|
@ -1151,7 +1151,7 @@ INT_PTR CALLBACK CheatsSearchViewWnd(HWND dialog, UINT msg,WPARAM wparam,LPARAM
|
||||||
while (cheatSearch->getList(&address, &val))
|
while (cheatSearch->getList(&address, &val))
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
sprintf(buf, "0x02%06X", address);
|
wsprintf(buf, "0x02%06X", address);
|
||||||
lvi.pszText= buf;
|
lvi.pszText= buf;
|
||||||
u32 row = SendMessage(searchListView, LVM_INSERTITEM, 0, (LPARAM)&lvi);
|
u32 row = SendMessage(searchListView, LVM_INSERTITEM, 0, (LPARAM)&lvi);
|
||||||
_ltoa(val, buf, 10);
|
_ltoa(val, buf, 10);
|
||||||
|
@ -1379,7 +1379,7 @@ INT_PTR CALLBACK CheatsExportProc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lpa
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_CDATE), (LPCSTR)cheatsExport->date);
|
SetWindowText(GetDlgItem(dialog, IDC_CDATE), (LPCSTR)cheatsExport->date);
|
||||||
if (cheatsExport->gametitle[0] != 0)
|
if ((char*)cheatsExport->gametitle != "")
|
||||||
{
|
{
|
||||||
char buf[512] = {0};
|
char buf[512] = {0};
|
||||||
GetWindowText(dialog, &buf[0], sizeof(buf));
|
GetWindowText(dialog, &buf[0], sizeof(buf));
|
||||||
|
|
|
@ -248,7 +248,7 @@ INT_PTR CALLBACK GbaSlotGBAgame(HWND dialog, UINT msg,WPARAM wparam,LPARAM lpara
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_PATHGAME), tmp_gbagame_filename);
|
SetWindowText(GetDlgItem(dialog, IDC_PATHGAME), tmp_gbagame_filename);
|
||||||
_OKbutton = (tmp_gbagame_filename[0] != 0)?true:false;
|
if (strlen(tmp_gbagame_filename) > 0) _OKbutton = true;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
@ -349,7 +349,7 @@ INT_PTR CALLBACK GbaSlotGuitarGrip(HWND dialog, UINT msg,WPARAM wparam,LPARAM lp
|
||||||
SendDlgItemMessage(dialog,IDC_GYELLOW,WM_USER+44,tmp_Guitar.YELLOW,0);
|
SendDlgItemMessage(dialog,IDC_GYELLOW,WM_USER+44,tmp_Guitar.YELLOW,0);
|
||||||
SendDlgItemMessage(dialog,IDC_GBLUE,WM_USER+44,tmp_Guitar.BLUE,0);
|
SendDlgItemMessage(dialog,IDC_GBLUE,WM_USER+44,tmp_Guitar.BLUE,0);
|
||||||
PostMessage(dialog,WM_NEXTDLGCTL,0,0);
|
PostMessage(dialog,WM_NEXTDLGCTL,0,0);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -435,7 +435,7 @@ INT_PTR CALLBACK GbaSlotPiano(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
SendDlgItemMessage(dialog,IDC_PIANO_B,WM_USER+44,tmp_Piano.B,0);
|
SendDlgItemMessage(dialog,IDC_PIANO_B,WM_USER+44,tmp_Piano.B,0);
|
||||||
SendDlgItemMessage(dialog,IDC_PIANO_HIC,WM_USER+44,tmp_Piano.HIC,0);
|
SendDlgItemMessage(dialog,IDC_PIANO_HIC,WM_USER+44,tmp_Piano.HIC,0);
|
||||||
PostMessage(dialog,WM_NEXTDLGCTL,0,0);
|
PostMessage(dialog,WM_NEXTDLGCTL,0,0);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -556,7 +556,7 @@ static void InputTimer()
|
||||||
bool S9xGetState (WORD KeyIdent);
|
bool S9xGetState (WORD KeyIdent);
|
||||||
|
|
||||||
static DWORD lastTime = timeGetTime();
|
static DWORD lastTime = timeGetTime();
|
||||||
DWORD currentTime = lastTime;
|
DWORD currentTime = timeGetTime();
|
||||||
|
|
||||||
static struct JoyState {
|
static struct JoyState {
|
||||||
bool wasPressed;
|
bool wasPressed;
|
||||||
|
@ -4196,7 +4196,7 @@ void ScreenshotToClipboard(bool extraInfo)
|
||||||
else
|
else
|
||||||
TextOut(hMemDC, 0, 384 + 14, nameandver, strlen(nameandver));
|
TextOut(hMemDC, 0, 384 + 14, nameandver, strlen(nameandver));
|
||||||
|
|
||||||
char str[38];
|
char str[32];
|
||||||
memcpy(&str[0], &MMU.CART_ROM[0], 12); str[12] = '\0';
|
memcpy(&str[0], &MMU.CART_ROM[0], 12); str[12] = '\0';
|
||||||
int titlelen = strlen(str);
|
int titlelen = strlen(str);
|
||||||
str[titlelen] = ' ';
|
str[titlelen] = ' ';
|
||||||
|
|
|
@ -105,7 +105,7 @@ INT_PTR CALLBACK Slot1R4(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_fat_path);
|
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_fat_path);
|
||||||
_OKbutton_slot1 = (tmp_fat_path[0] != 0);
|
_OKbutton_slot1 = (tmp_fat_path!="");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue