No changes, just cleaning burner/*
This commit is contained in:
parent
80c3566c46
commit
d9728bd5b2
|
@ -433,7 +433,7 @@ static INT32 ConfigParseMAMEFile()
|
|||
|
||||
TCHAR szFileName[MAX_PATH] = _T("");
|
||||
_stprintf(szFileName, _T("%scheat.dat"), szAppCheatsPath);
|
||||
|
||||
|
||||
FILE *fz = _tfopen(szFileName, _T("rt"));
|
||||
if (fz == NULL) {
|
||||
return 1;
|
||||
|
@ -592,7 +592,7 @@ static INT32 ConfigParseMAMEFile()
|
|||
|
||||
OptionName(tmp);
|
||||
AddressInfo();
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
static void ReplaceAmpersand(char *szBuffer, char *szGameName)
|
||||
{
|
||||
UINT32 nStringPos = 0;
|
||||
|
||||
|
||||
for (UINT32 i = 0; i < strlen(szGameName); i++) {
|
||||
if (szGameName[i] == '&') {
|
||||
szBuffer[nStringPos + 0] = '&';
|
||||
|
@ -29,7 +29,7 @@ static void ReplaceAmpersand(char *szBuffer, char *szGameName)
|
|||
static void ReplaceLessThan(char *szBuffer, char *szGameName)
|
||||
{
|
||||
UINT32 nStringPos = 0;
|
||||
|
||||
|
||||
for (UINT32 i = 0; i < strlen(szGameName); i++) {
|
||||
if (szGameName[i] == '<') {
|
||||
szBuffer[nStringPos + 0] = '&';
|
||||
|
@ -47,7 +47,7 @@ static void ReplaceLessThan(char *szBuffer, char *szGameName)
|
|||
static void ReplaceGreaterThan(char *szBuffer, char *szGameName)
|
||||
{
|
||||
UINT32 nStringPos = 0;
|
||||
|
||||
|
||||
for (UINT32 i = 0; i < strlen(szGameName); i++) {
|
||||
if (szGameName[i] == '>') {
|
||||
szBuffer[nStringPos + 0] = '&';
|
||||
|
@ -103,7 +103,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
UINT32 nOldSelect=0;
|
||||
UINT32 nGameSelect=0;
|
||||
UINT32 nParentSelect,nBoardROMSelect;
|
||||
|
||||
|
||||
fprintf(fDat, "<?xml version=\"1.0\"?>\n");
|
||||
fprintf(fDat, "<!DOCTYPE datafile PUBLIC \"-//FB Alpha//DTD ROM Management Datafile//EN\" \"http://www.logiqx.com/Dats/datafile.dtd\">\n\n");
|
||||
fprintf(fDat, "<datafile>\n");
|
||||
|
@ -138,7 +138,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
fprintf(fDat, "\t\t<author>" APP_TITLE "</author>\n");
|
||||
fprintf(fDat, "\t\t<homepage>https://neo-source.com/</homepage>\n");
|
||||
fprintf(fDat, "\t\t<url>https://neo-source.com/</url>\n");
|
||||
fprintf(fDat, "\t\t<clrmamepro forcenodump=\"ignore\"/>\n");
|
||||
fprintf(fDat, "\t\t<clrmamepro forcenodump=\"ignore\"/>\n");
|
||||
fprintf(fDat, "\t</header>\n");
|
||||
|
||||
nOldSelect=nBurnDrvActive; // preserve the currently selected driver
|
||||
|
@ -196,11 +196,11 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_COLECO) && (bType == DAT_COLECO_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SEGA_MASTER_SYSTEM) && (bType == DAT_MASTERSYSTEM_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SEGA_GAME_GEAR) && (bType == DAT_GAMEGEAR_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_MSX) && (bType == DAT_MSX_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SPECTRUM) && (bType == DAT_SPECTRUM_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -268,11 +268,11 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
}
|
||||
else
|
||||
nBoardROMSelect=nGameSelect;
|
||||
|
||||
|
||||
if (BurnDrvGetTextA(DRV_SAMPLENAME)) {
|
||||
strcpy(ssName, BurnDrvGetTextA(DRV_SAMPLENAME));
|
||||
}
|
||||
|
||||
|
||||
remove_driver_leader(HARDWARE_SEGA_MEGADRIVE, 3, 1)
|
||||
remove_driver_leader(HARDWARE_PCENGINE_TG16, 3, 1)
|
||||
remove_driver_leader(HARDWARE_COLECO, 3, 1)
|
||||
|
@ -313,17 +313,17 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
char szGameName[255];
|
||||
char szGameNameBuffer[255];
|
||||
char szManufacturer[255];
|
||||
char szManufacturerBuffer[255];
|
||||
|
||||
|
||||
memset(szGameName, 0, 255);
|
||||
memset(szGameNameBuffer, 0, 255);
|
||||
memset(szManufacturer, 0, 255);
|
||||
memset(szManufacturerBuffer, 0, 255);
|
||||
|
||||
|
||||
strcpy(szGameName, DecorateGameName(nBurnDrvActive));
|
||||
ReplaceAmpersand(szGameNameBuffer, szGameName);
|
||||
memset(szGameName, 0, 255);
|
||||
|
@ -333,8 +333,8 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
memset(szGameName, 0, 255);
|
||||
strcpy(szGameName, szGameNameBuffer);
|
||||
memset(szGameNameBuffer, 0, 255);
|
||||
ReplaceGreaterThan(szGameNameBuffer, szGameName);
|
||||
|
||||
ReplaceGreaterThan(szGameNameBuffer, szGameName);
|
||||
|
||||
strcpy(szManufacturer, BurnDrvGetTextA(DRV_MANUFACTURER));
|
||||
ReplaceAmpersand(szManufacturerBuffer, szManufacturer);
|
||||
memset(szManufacturer, 0, 255);
|
||||
|
@ -345,11 +345,11 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
strcpy(szManufacturer, szManufacturerBuffer);
|
||||
memset(szManufacturerBuffer, 0, 255);
|
||||
ReplaceGreaterThan(szManufacturerBuffer, szManufacturer);
|
||||
|
||||
|
||||
fprintf(fDat, "\t\t<description>%s</description>\n", szGameNameBuffer);
|
||||
fprintf(fDat, "\t\t<year>%s</year>\n", BurnDrvGetTextA(DRV_DATE));
|
||||
fprintf(fDat, "\t\t<manufacturer>%s</manufacturer>\n", szManufacturerBuffer);
|
||||
|
||||
|
||||
// Write the individual ROM info
|
||||
for (nPass=0; nPass<2; nPass++)
|
||||
{
|
||||
|
@ -437,10 +437,10 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
|
||||
char szPossibleNameBuffer[255];
|
||||
char szPossibleNameBuffer2[255];
|
||||
|
||||
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
memset(szPossibleNameBuffer2, 0, 255);
|
||||
|
||||
|
||||
ReplaceAmpersand(szPossibleNameBuffer, szPossibleName);
|
||||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
|
@ -449,7 +449,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
ReplaceGreaterThan(szPossibleNameBuffer, szPossibleNameBuffer2);
|
||||
|
||||
|
||||
// File info
|
||||
if (nPass==1 && !nMerged) {
|
||||
if (ri.nType & BRF_NODUMP) {
|
||||
|
@ -468,7 +468,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// samples
|
||||
if (strcmp(ssName, "")) {
|
||||
for (i=0, nRet=0; nRet==0 && i<0x100; i++)
|
||||
|
@ -488,10 +488,10 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (nPass == 1) {
|
||||
char szPossibleNameBuffer[255];
|
||||
char szPossibleNameBuffer2[255];
|
||||
|
||||
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
memset(szPossibleNameBuffer2, 0, 255);
|
||||
|
||||
|
||||
ReplaceAmpersand(szPossibleNameBuffer, szPossibleName);
|
||||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
|
@ -500,7 +500,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
ReplaceGreaterThan(szPossibleNameBuffer, szPossibleNameBuffer2);
|
||||
|
||||
|
||||
fprintf(fDat, "\t\t<sample name=\"%s\" />\n", szPossibleNameBuffer);
|
||||
}
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (!(BurnDrvGetFlags() & BDF_BOARDROM)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ((((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SEGA_MEGADRIVE)
|
||||
|| ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_PCENGINE_PCENGINE)
|
||||
|| ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_PCENGINE_TG16)
|
||||
|
@ -535,19 +535,19 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
) && (bType == DAT_ARCADE_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SEGA_MEGADRIVE) && (bType == DAT_MEGADRIVE_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_PCENGINE_PCENGINE) && (bType == DAT_PCENGINE_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_PCENGINE_TG16) && (bType == DAT_TG16_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_PCENGINE_SGX) && (bType == DAT_SGX_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -559,11 +559,11 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_COLECO) && (bType == DAT_COLECO_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SEGA_MASTER_SYSTEM) && (bType == DAT_MASTERSYSTEM_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SEGA_GAME_GEAR) && (bType == DAT_GAMEGEAR_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_MSX) && (bType == DAT_MSX_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SPECTRUM) && (bType == DAT_SPECTRUM_ONLY)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
#ifdef DAT_DEBUG
|
||||
bprintf(PRINT_IMPORTANT, _T("DAT(BOARDROMS): Processing %S.\n"), sgName);
|
||||
#endif
|
||||
|
||||
|
||||
remove_driver_leader(HARDWARE_SEGA_MEGADRIVE, 3, 0)
|
||||
remove_driver_leader(HARDWARE_PCENGINE_TG16, 3, 0)
|
||||
remove_driver_leader(HARDWARE_COLECO, 3, 0)
|
||||
|
@ -600,7 +600,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
fprintf(fDat, "\t<game isbios=\"yes\" name=\"%s\">\n", sgName);
|
||||
fprintf(fDat, "\t\t<description>%s</description>\n", DecorateGameName(nBurnDrvActive));
|
||||
fprintf(fDat, "\t\t<year>%s</year>\n", BurnDrvGetTextA(DRV_DATE));
|
||||
fprintf(fDat, "\t\t<manufacturer>%s</manufacturer>\n", BurnDrvGetTextA(DRV_MANUFACTURER));
|
||||
fprintf(fDat, "\t\t<manufacturer>%s</manufacturer>\n", BurnDrvGetTextA(DRV_MANUFACTURER));
|
||||
|
||||
for (nPass=0; nPass<2; nPass++)
|
||||
{
|
||||
|
@ -623,10 +623,10 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
if (nRet==0) {
|
||||
char szPossibleNameBuffer[255];
|
||||
char szPossibleNameBuffer2[255];
|
||||
|
||||
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
memset(szPossibleNameBuffer2, 0, 255);
|
||||
|
||||
|
||||
ReplaceAmpersand(szPossibleNameBuffer, szPossibleName);
|
||||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
|
@ -635,7 +635,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
strcpy(szPossibleNameBuffer2, szPossibleNameBuffer);
|
||||
memset(szPossibleNameBuffer, 0, 255);
|
||||
ReplaceGreaterThan(szPossibleNameBuffer, szPossibleNameBuffer2);
|
||||
|
||||
|
||||
fprintf(fDat, "\t\t<rom name=\"%s\" size=\"%d\" crc=\"%08x\"/>\n", szPossibleNameBuffer, ri.nLen, ri.nCrc);
|
||||
}
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ INT32 write_datfile(INT32 bType, FILE* fDat)
|
|||
|
||||
// Restore current driver
|
||||
nBurnDrvActive=nOldSelect;
|
||||
|
||||
|
||||
fprintf(fDat, "</datafile>");
|
||||
|
||||
return 0;
|
||||
|
@ -656,7 +656,7 @@ INT32 create_datfile(TCHAR* szFilename, INT32 bType)
|
|||
{
|
||||
FILE *fDat=0;
|
||||
INT32 nRet=0;
|
||||
|
||||
|
||||
if ((fDat = _tfopen(szFilename, _T("wt")))==0)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -40,133 +40,133 @@ INT32 GamcMisc(struct GameInp* pgi, char* szi, INT32 nPlayer)
|
|||
KEY(FBK_T);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "op menu" ) == 0) {
|
||||
KEY(FBK_F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "clear credit" ) == 0) {
|
||||
KEY(FBK_G);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "hopper" ) == 0) {
|
||||
KEY(FBK_H);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Mahjong controls
|
||||
if (strcmp(szi, "mah a") == 0) {
|
||||
KEY(FBK_A);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah b") == 0) {
|
||||
KEY(FBK_B);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah c") == 0) {
|
||||
KEY(FBK_C);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah d") == 0) {
|
||||
KEY(FBK_D);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah e") == 0) {
|
||||
KEY(FBK_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah f") == 0) {
|
||||
KEY(FBK_F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah g") == 0) {
|
||||
KEY(FBK_G);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah h") == 0) {
|
||||
KEY(FBK_H);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah i") == 0) {
|
||||
KEY(FBK_I);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah j") == 0) {
|
||||
KEY(FBK_J);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah k") == 0) {
|
||||
KEY(FBK_K);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah l") == 0) {
|
||||
KEY(FBK_L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah m") == 0) {
|
||||
KEY(FBK_M);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah n") == 0) {
|
||||
KEY(FBK_N);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah kan") == 0) {
|
||||
KEY(FBK_LCONTROL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah pon") == 0) {
|
||||
KEY(FBK_LALT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah chi") == 0) {
|
||||
KEY(FBK_SPACE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah reach") == 0) {
|
||||
KEY(FBK_LSHIFT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah ron") == 0) {
|
||||
KEY(FBK_Z);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah ff") == 0) {
|
||||
KEY(FBK_Y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah lc") == 0) {
|
||||
KEY(FBK_RALT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah bet") == 0) {
|
||||
KEY(FBK_2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "mah score") == 0) {
|
||||
KEY(FBK_RCONTROL);
|
||||
return 0;
|
||||
|
@ -185,288 +185,288 @@ INT32 GamcMisc(struct GameInp* pgi, char* szi, INT32 nPlayer)
|
|||
KEY(FBK_5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// keyboard keys
|
||||
if (strcmp(szi, "keyb_enter" ) == 0) {
|
||||
KEY(FBK_RETURN);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_left_shift" ) == 0) {
|
||||
KEY(FBK_LSHIFT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_right_shift" ) == 0) {
|
||||
KEY(FBK_RSHIFT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_space" ) == 0) {
|
||||
KEY(FBK_SPACE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_0" ) == 0) {
|
||||
KEY(FBK_0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_1" ) == 0) {
|
||||
KEY(FBK_1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_2" ) == 0) {
|
||||
KEY(FBK_2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_3" ) == 0) {
|
||||
KEY(FBK_3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_4" ) == 0) {
|
||||
KEY(FBK_4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_5" ) == 0) {
|
||||
KEY(FBK_5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_6" ) == 0) {
|
||||
KEY(FBK_6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_7" ) == 0) {
|
||||
KEY(FBK_7);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_8" ) == 0) {
|
||||
KEY(FBK_8);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_9" ) == 0) {
|
||||
KEY(FBK_9);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_A" ) == 0) {
|
||||
KEY(FBK_A);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_B" ) == 0) {
|
||||
KEY(FBK_B);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_C" ) == 0) {
|
||||
KEY(FBK_C);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_D" ) == 0) {
|
||||
KEY(FBK_D);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_E" ) == 0) {
|
||||
KEY(FBK_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_F" ) == 0) {
|
||||
KEY(FBK_F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_G" ) == 0) {
|
||||
KEY(FBK_G);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_H" ) == 0) {
|
||||
KEY(FBK_H);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_I" ) == 0) {
|
||||
KEY(FBK_I);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_J" ) == 0) {
|
||||
KEY(FBK_J);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_K" ) == 0) {
|
||||
KEY(FBK_K);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_L" ) == 0) {
|
||||
KEY(FBK_L);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_M" ) == 0) {
|
||||
KEY(FBK_M);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_N" ) == 0) {
|
||||
KEY(FBK_N);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_O" ) == 0) {
|
||||
KEY(FBK_O);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_P" ) == 0) {
|
||||
KEY(FBK_P);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_Q" ) == 0) {
|
||||
KEY(FBK_Q);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_R" ) == 0) {
|
||||
KEY(FBK_R);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_S" ) == 0) {
|
||||
KEY(FBK_S);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_T" ) == 0) {
|
||||
KEY(FBK_T);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_U" ) == 0) {
|
||||
KEY(FBK_U);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_V" ) == 0) {
|
||||
KEY(FBK_V);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_W" ) == 0) {
|
||||
KEY(FBK_W);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_X" ) == 0) {
|
||||
KEY(FBK_X);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_Y" ) == 0) {
|
||||
KEY(FBK_Y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_Z" ) == 0) {
|
||||
KEY(FBK_Z);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_insert" ) == 0) {
|
||||
KEY(FBK_INSERT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_caps_lock" ) == 0) {
|
||||
KEY(FBK_CAPITAL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_home" ) == 0) {
|
||||
KEY(FBK_HOME);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_end" ) == 0) {
|
||||
KEY(FBK_END);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_left" ) == 0) {
|
||||
KEY(FBK_LEFTARROW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_right" ) == 0) {
|
||||
KEY(FBK_RIGHTARROW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_up" ) == 0) {
|
||||
KEY(FBK_UPARROW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_down" ) == 0) {
|
||||
KEY(FBK_DOWNARROW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_backspace" ) == 0) {
|
||||
KEY(FBK_BACK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_left_alt" ) == 0) {
|
||||
KEY(FBK_LALT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_pause" ) == 0) {
|
||||
KEY(FBK_PAUSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_left_ctrl" ) == 0) {
|
||||
KEY(FBK_LCONTROL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_apost" ) == 0) {
|
||||
KEY(FBK_APOSTROPHE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_colon" ) == 0) {
|
||||
KEY(FBK_COLON);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_stop" ) == 0) {
|
||||
KEY(FBK_PERIOD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(szi, "keyb_comma" ) == 0) {
|
||||
KEY(FBK_COMMA);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case 1:
|
||||
if (strcmp(szi, "p2 start") == 0) {
|
||||
|
@ -665,12 +665,12 @@ INT32 GamcPlayer(struct GameInp* pgi, char* szi, INT32 nPlayer, INT32 nDevice)
|
|||
{
|
||||
char* szSearch = szPlay[nPlayer & 3];
|
||||
INT32 nJoyBase = 0;
|
||||
|
||||
|
||||
if (_strnicmp(szSearch, szi, 3) != 0) { // Not our player
|
||||
return 1;
|
||||
}
|
||||
szi += 3;
|
||||
|
||||
|
||||
if (nDevice <= -2) {
|
||||
INT32 bOurs = 0;
|
||||
if (strcmp(szi, "up") == 0 || strcmp(szi, "y-axis-neg") == 0) {
|
||||
|
|
|
@ -226,7 +226,7 @@ static void GameInpInitMacros()
|
|||
nKickx3[nPlayer] |= 4;
|
||||
nKickInputs[nPlayer][2] = i;
|
||||
}
|
||||
|
||||
|
||||
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_NEOGEO) {
|
||||
if (_stricmp(" Button A", bii.szName + 2) == 0) {
|
||||
nNeogeoButtons[nPlayer][0] = i;
|
||||
|
@ -394,7 +394,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -407,7 +407,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -420,7 +420,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -433,7 +433,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -446,7 +446,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -459,7 +459,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -475,7 +475,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[2] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -491,7 +491,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[2] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -543,7 +543,7 @@ static void GameInpInitMacros()
|
|||
nMacroCount++;
|
||||
pgi++;
|
||||
}
|
||||
|
||||
|
||||
if (nFireButtons == 4 && (BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_IGS_PGM) {
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
|
@ -557,7 +557,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -570,7 +570,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -583,7 +583,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -596,7 +596,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -609,7 +609,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -622,7 +622,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[1] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -638,7 +638,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[2] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -654,7 +654,7 @@ static void GameInpInitMacros()
|
|||
pgi->Macro.nVal[2] = 1;
|
||||
nMacroCount++;
|
||||
pgi++;
|
||||
|
||||
|
||||
pgi->nInput = GIT_MACRO_AUTO;
|
||||
pgi->nType = BIT_DIGITAL;
|
||||
pgi->Macro.nMode = 0;
|
||||
|
@ -1548,7 +1548,7 @@ INT32 GameInputAutoIni(INT32 nPlayer, TCHAR* lpszFile, bool bOverWrite)
|
|||
UINT32 i;
|
||||
|
||||
//nAnalogSpeed = 0x0100; /* this clobbers the setting read at the beginning of the file. */
|
||||
|
||||
|
||||
FILE* h = _tfopen(lpszFile, _T("rt"));
|
||||
if (h == NULL) {
|
||||
return 1;
|
||||
|
@ -1643,24 +1643,24 @@ INT32 ConfigGameLoadHardwareDefaults()
|
|||
TCHAR *szDefaultPgmFile = _T("config/presets/pgm.ini");
|
||||
TCHAR *szFileName = _T("");
|
||||
INT32 nApplyHardwareDefaults = 0;
|
||||
|
||||
|
||||
INT32 nHardwareFlag = (BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK);
|
||||
|
||||
if (nHardwareFlag == HARDWARE_CAPCOM_CPS1 || nHardwareFlag == HARDWARE_CAPCOM_CPS1_QSOUND || nHardwareFlag == HARDWARE_CAPCOM_CPS1_GENERIC || nHardwareFlag == HARDWARE_CAPCOM_CPSCHANGER || nHardwareFlag == HARDWARE_CAPCOM_CPS2 || nHardwareFlag == HARDWARE_CAPCOM_CPS3) {
|
||||
szFileName = szDefaultCpsFile;
|
||||
nApplyHardwareDefaults = 1;
|
||||
}
|
||||
|
||||
|
||||
if (nHardwareFlag == HARDWARE_SNK_NEOGEO) {
|
||||
szFileName = szDefaultNeogeoFile;
|
||||
nApplyHardwareDefaults = 1;
|
||||
}
|
||||
|
||||
|
||||
if (nHardwareFlag == HARDWARE_IGS_PGM) {
|
||||
szFileName = szDefaultPgmFile;
|
||||
nApplyHardwareDefaults = 1;
|
||||
}
|
||||
|
||||
|
||||
if (nApplyHardwareDefaults) {
|
||||
for (INT32 nPlayer = 0; nPlayer < nMaxPlayers; nPlayer++) {
|
||||
GameInputAutoIni(nPlayer, szFileName, true);
|
||||
|
|
|
@ -112,7 +112,7 @@ static INT32 img_process(IMAGE* img, UINT32 width, UINT32 height, INT32 /*preset
|
|||
};*/
|
||||
|
||||
IMAGE sized_img;
|
||||
|
||||
|
||||
double ratio = (double)(height * width) / (img->height * img->width);
|
||||
|
||||
/* {
|
||||
|
@ -245,17 +245,17 @@ static INT32 img_process(IMAGE* img, UINT32 width, UINT32 height, INT32 /*preset
|
|||
for (y1 = y1 + 1; y1 < img->height * (y + 1) / sized_img.height; y1++) {
|
||||
x1 = img->width * x / sized_img.width;
|
||||
xf = (double)img->width * x / sized_img.width - x1;
|
||||
|
||||
|
||||
r1 = (double)img->rowptr[y1][x1 * 3 + 0] * (1.0 - xf);
|
||||
g1 = (double)img->rowptr[y1][x1 * 3 + 1] * (1.0 - xf);
|
||||
b1 = (double)img->rowptr[y1][x1 * 3 + 2] * (1.0 - xf);
|
||||
|
||||
|
||||
for (x1 = x1 + 1; x1 < img->width * (x + 1) / sized_img.width; x1++) {
|
||||
r1 += (double)img->rowptr[y1][x1 * 3 + 0];
|
||||
g1 += (double)img->rowptr[y1][x1 * 3 + 1];
|
||||
b1 += (double)img->rowptr[y1][x1 * 3 + 2];
|
||||
}
|
||||
|
||||
|
||||
if (x1 < img->width) {
|
||||
xf = (double)img->width * (x + 1) / sized_img.width - x1;
|
||||
r1 += (double)img->rowptr[y1][x1 * 3 + 0] * xf;
|
||||
|
@ -270,26 +270,26 @@ static INT32 img_process(IMAGE* img, UINT32 width, UINT32 height, INT32 /*preset
|
|||
|
||||
if (y1 < img->height) {
|
||||
yf = (double)img->height * (y + 1) / sized_img.height - y1;
|
||||
|
||||
|
||||
x1 = img->width * x / sized_img.width;
|
||||
xf = (double)img->width * x / sized_img.width - x1;
|
||||
r1 = (double)img->rowptr[y1][x1 * 3 + 0] * (1.0 - xf);
|
||||
g1 = (double)img->rowptr[y1][x1 * 3 + 1] * (1.0 - xf);
|
||||
b1 = (double)img->rowptr[y1][x1 * 3 + 2] * (1.0 - xf);
|
||||
|
||||
|
||||
for (x1 = x1 + 1; x1 < img->width * (x + 1) / sized_img.width; x1++) {
|
||||
r1 += (double)img->rowptr[y1][x1 * 3 + 0];
|
||||
g1 += (double)img->rowptr[y1][x1 * 3 + 1];
|
||||
b1 += (double)img->rowptr[y1][x1 * 3 + 2];
|
||||
}
|
||||
|
||||
|
||||
if (x1 < img->width) {
|
||||
xf = (double)img->width * (x + 1) / sized_img.width - x1;
|
||||
r1 += (double)img->rowptr[y1][x1 * 3 + 0] * xf;
|
||||
g1 += (double)img->rowptr[y1][x1 * 3 + 1] * xf;
|
||||
b1 += (double)img->rowptr[y1][x1 * 3 + 2] * xf;
|
||||
}
|
||||
|
||||
|
||||
r0 += r1 * yf;
|
||||
g0 += g1 * yf;
|
||||
b0 += b1 * yf;
|
||||
|
@ -333,7 +333,7 @@ static INT32 img_process(IMAGE* img, UINT32 width, UINT32 height, INT32 /*preset
|
|||
for (INT32 y = -4; y < 5; y++) {
|
||||
|
||||
double c = sqrt(double(x * x + y * y));
|
||||
|
||||
|
||||
matrix[y + 4][x + 4] = 1.0 / exp(-c * -c / b);
|
||||
}
|
||||
}
|
||||
|
@ -425,7 +425,7 @@ INT32 PNGLoad(IMAGE* img, FILE* fp, INT32 nPreset)
|
|||
IMAGE temp_img;
|
||||
png_uint_32 width = 0, height = 0;
|
||||
INT32 bit_depth, color_type;
|
||||
|
||||
|
||||
if (fp) {
|
||||
// check signature
|
||||
UINT8 pngsig[PNG_SIG_CHECK_BYTES];
|
||||
|
@ -433,29 +433,29 @@ INT32 PNGLoad(IMAGE* img, FILE* fp, INT32 nPreset)
|
|||
if (png_sig_cmp(pngsig, 0, PNG_SIG_CHECK_BYTES)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
if (!png_ptr) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
if (!info_ptr) {
|
||||
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
memset(&temp_img, 0, sizeof(IMAGE));
|
||||
png_init_io(png_ptr, fp);
|
||||
png_set_sig_bytes(png_ptr, PNG_SIG_CHECK_BYTES);
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
|
||||
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Instruct libpng to convert the image to 24-bit RGB format
|
||||
if (color_type == PNG_COLOR_TYPE_PALETTE) {
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
|
@ -469,23 +469,23 @@ INT32 PNGLoad(IMAGE* img, FILE* fp, INT32 nPreset)
|
|||
if (color_type & PNG_COLOR_MASK_ALPHA) {
|
||||
png_set_strip_alpha(png_ptr);
|
||||
}
|
||||
|
||||
|
||||
temp_img.width = width;
|
||||
temp_img.height = height;
|
||||
|
||||
|
||||
// Initialize our img structure
|
||||
if (img_alloc(&temp_img)) {
|
||||
//longjmp(png_ptr->jmpbuf, 1);
|
||||
png_jmpbuf(png_ptr);
|
||||
}
|
||||
|
||||
|
||||
// If bad things happen in libpng we need to do img_free(&temp_img) as well
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
img_free(&temp_img);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Read the .PNG image
|
||||
png_set_bgr(png_ptr);
|
||||
png_read_update_info(png_ptr, info_ptr);
|
||||
|
@ -501,28 +501,28 @@ INT32 PNGLoad(IMAGE* img, FILE* fp, INT32 nPreset)
|
|||
BYTE* pResourceData = (BYTE*)LockResource(hglobal);
|
||||
|
||||
BITMAPINFOHEADER* pbmih = (BITMAPINFOHEADER*)LockResource(hglobal);
|
||||
|
||||
|
||||
// Allocate a new image
|
||||
memset(&temp_img, 0, sizeof(IMAGE));
|
||||
temp_img.width = pbmih->biWidth;
|
||||
temp_img.height = pbmih->biHeight;
|
||||
temp_img.bmpbits = pResourceData + pbmih->biSize;
|
||||
img_alloc(&temp_img);
|
||||
|
||||
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (img_process(&temp_img, img->width ? img->width : temp_img.width, img->height ? img->height : temp_img.height, nPreset, false)) {
|
||||
img_free(&temp_img);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
bPngImageOrientation = 0;
|
||||
if (height && width && height > width) bPngImageOrientation = 1;
|
||||
|
||||
|
||||
memcpy(img, &temp_img, sizeof(IMAGE));
|
||||
|
||||
return 0;
|
||||
|
@ -533,7 +533,7 @@ INT32 PNGGetInfo(IMAGE* img, FILE *fp)
|
|||
IMAGE temp_img;
|
||||
png_uint_32 width = 0, height = 0;
|
||||
INT32 bit_depth, color_type;
|
||||
|
||||
|
||||
if (fp) {
|
||||
// check signature
|
||||
UINT8 pngsig[PNG_SIG_CHECK_BYTES];
|
||||
|
@ -541,42 +541,42 @@ INT32 PNGGetInfo(IMAGE* img, FILE *fp)
|
|||
if (png_sig_cmp(pngsig, 0, PNG_SIG_CHECK_BYTES)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
if (!png_ptr) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
if (!info_ptr) {
|
||||
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
memset(&temp_img, 0, sizeof(IMAGE));
|
||||
png_init_io(png_ptr, fp);
|
||||
png_set_sig_bytes(png_ptr, PNG_SIG_CHECK_BYTES);
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
|
||||
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
temp_img.width = width;
|
||||
temp_img.height = height;
|
||||
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
}
|
||||
|
||||
|
||||
memcpy(img, &temp_img, sizeof(IMAGE));
|
||||
img_free(&temp_img);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ char* DecorateGameName(UINT32 nBurnDrv)
|
|||
if ((BurnDrvGetFlags() & BDF_BOOTLEG) || (BurnDrvGetTextA(DRV_COMMENT) && strlen(BurnDrvGetTextA(DRV_COMMENT)) > 0)) {
|
||||
s10 = ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BurnDrvGetFlags() & BDF_BOOTLEG) {
|
||||
s11 = "Bootleg";
|
||||
if (BurnDrvGetTextA(DRV_COMMENT) && strlen(BurnDrvGetTextA(DRV_COMMENT)) > 0) {
|
||||
|
@ -183,14 +183,14 @@ TCHAR* DecorateGenreInfo()
|
|||
{
|
||||
INT32 nGenre = BurnDrvGetGenreFlags();
|
||||
INT32 nFamily = BurnDrvGetFamilyFlags();
|
||||
|
||||
|
||||
static TCHAR szDecoratedGenre[256];
|
||||
TCHAR szFamily[256];
|
||||
|
||||
|
||||
_stprintf(szDecoratedGenre, _T(""));
|
||||
_stprintf(szFamily, _T(""));
|
||||
|
||||
#ifdef BUILD_WIN32
|
||||
|
||||
#ifdef BUILD_WIN32
|
||||
//TODO: Translations are not working in non-win32 builds. This needs to be fixed
|
||||
|
||||
if (nGenre) {
|
||||
|
@ -198,163 +198,163 @@ TCHAR* DecorateGenreInfo()
|
|||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_HORSHOOT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_VERSHOOT) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_VERSHOOT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_SCRFIGHT) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_SCRFIGHT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_VSFIGHT) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_VSFIGHT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_BIOS) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_BIOS, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_BREAKOUT) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_BREAKOUT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_CASINO) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_CASINO, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_BALLPADDLE) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_BALLPADDLE, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_MAZE) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_MAZE, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_MINIGAMES) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_MINIGAMES, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_PINBALL) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_PINBALL, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_PLATFORM) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_PLATFORM, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_PUZZLE) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_PUZZLE, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_QUIZ) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_QUIZ, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_SPORTSMISC) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_SPORTSMISC, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_SPORTSFOOTBALL) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_SPORTSFOOTBALL, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_MISC) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_MISC, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_MAHJONG) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_MAHJONG, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_RACING) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_RACING, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_SHOOT) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_SHOOT, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_ACTION) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_ACTION, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_RUNGUN) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_RUNGUN, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nGenre & GBF_STRATEGY) {
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), FBALoadStringEx(hAppInst, IDS_GENRE_STRATEGY, true));
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
szDecoratedGenre[_tcslen(szDecoratedGenre) - 2] = _T('\0');
|
||||
}
|
||||
|
||||
|
||||
if (nFamily) {
|
||||
_stprintf(szFamily, _T(" ("));
|
||||
|
||||
|
||||
if (nFamily & FBF_MSLUG) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_MSLUG, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_SF) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_SF, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_KOF) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_KOF, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_DSTLK) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_DSTLK, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_FATFURY) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_FATFURY, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_SAMSHO) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_SAMSHO, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_19XX) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_19XX, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_SONICWI) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_SONICWI, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
|
||||
if (nFamily & FBF_PWRINST) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_PWRINST, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
|
@ -363,15 +363,15 @@ TCHAR* DecorateGenreInfo()
|
|||
if (nFamily & FBF_SONIC) {
|
||||
_stprintf(szFamily + _tcslen(szFamily), FBALoadStringEx(hAppInst, IDS_FAMILY_SONIC, true));
|
||||
_stprintf(szFamily + _tcslen(szFamily), _T(", "));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
szFamily[_tcslen(szFamily) - 2] = _T(')');
|
||||
szFamily[_tcslen(szFamily) - 1] = _T('\0');
|
||||
|
||||
|
||||
_stprintf(szDecoratedGenre + _tcslen(szDecoratedGenre), szFamily);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return szDecoratedGenre;
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,7 @@ TCHAR* DriverToName(UINT32 nDrv)
|
|||
{
|
||||
TCHAR* szName = NULL;
|
||||
UINT32 nOldDrv;
|
||||
|
||||
|
||||
if (nDrv >= nBurnDrvCount) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ struct iso9660_date
|
|||
{
|
||||
unsigned char Year; // Number of year since 1900
|
||||
unsigned char Month; // Month (1 to 12)
|
||||
unsigned char Day; // Day (1 to 31)
|
||||
unsigned char Hour; // Hour (0 to 23)
|
||||
unsigned char Minute; // Minute (0 to 59)
|
||||
unsigned char Second; // Second (0 to 59)
|
||||
unsigned char Day; // Day (1 to 31)
|
||||
unsigned char Hour; // Hour (0 to 23)
|
||||
unsigned char Minute; // Minute (0 to 59)
|
||||
unsigned char Second; // Second (0 to 59)
|
||||
unsigned char Zone; // Offset related to GMT, by 15-min interval (from -48 to +52)
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@ struct iso9660_DirectoryRecord
|
|||
unsigned char location_of_extent[8]; // [8] [LEF / BEF] LBN / Sector location of the file data
|
||||
unsigned char data_lenth[8]; // [8] [LEF / BEF] Length of the file section (bytes)
|
||||
iso9660_date rec_date_time; // [7] Recording Date and Time
|
||||
unsigned char file_flags; // [1] 8-bit flags
|
||||
unsigned char file_flags; // [1] 8-bit flags
|
||||
// [bit 0] File is Hidden if this bit is 1
|
||||
// [bit 1] Entry is a Directory if this bit is 1
|
||||
// [bit 2] Entry is an Associated file is this bit is 1
|
||||
|
@ -74,7 +74,7 @@ struct iso9660_DirectoryRecord
|
|||
char* file_id; // [LEN_FI] File Identifier
|
||||
};
|
||||
|
||||
struct iso9660_PathTableRecord
|
||||
struct iso9660_PathTableRecord
|
||||
{
|
||||
unsigned char len_di; // [1] Length of Directory Identifier
|
||||
unsigned char extended_attr_len; // [1] Extended Attribute Record Length
|
||||
|
@ -84,7 +84,7 @@ struct iso9660_PathTableRecord
|
|||
};
|
||||
|
||||
// Volume Descriptor Header (Sector 16)
|
||||
struct iso9660_VDH
|
||||
struct iso9660_VDH
|
||||
{
|
||||
char vdtype; // [1] Volume Descriptor Type
|
||||
unsigned char stdid[5]; // [5] ISO9660 Standard Identifier
|
||||
|
@ -116,12 +116,12 @@ struct iso9660_PVD
|
|||
unsigned char type_m_path_table[4];
|
||||
unsigned char opt_type_m_path_table[4];
|
||||
iso9660_DirectoryRecord root_directory_record;
|
||||
unsigned char volume_set_id[128];
|
||||
unsigned char volume_set_id[128];
|
||||
unsigned char publisher_id[128];
|
||||
unsigned char preparer_id[128];
|
||||
unsigned char application_id[128];
|
||||
unsigned char copyright_file_id[37];
|
||||
unsigned char abstract_file_id[37];
|
||||
unsigned char application_id[128];
|
||||
unsigned char copyright_file_id[37];
|
||||
unsigned char abstract_file_id[37];
|
||||
unsigned char bibliographic_file_id[37];
|
||||
|
||||
iso9660_bcd_date creation_date; // [17]
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
/***************************************************************************
|
||||
Above notices are from MAME
|
||||
|
||||
|
||||
Updated Feb 2012
|
||||
Adapted for use outside MAME by Barry Harris (FB Alpha)
|
||||
***************************************************************************/
|
||||
|
@ -129,7 +129,7 @@ WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin)
|
|||
if (origin==2) p->_7z_currfpos = p->_7z_length - *pos;
|
||||
|
||||
*pos = p->_7z_currfpos;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -263,11 +263,11 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search
|
|||
if ((zn>=0x41) && (zn<=0x5a)) zn+=0x20;
|
||||
|
||||
if (sn != zn) break;
|
||||
}
|
||||
}
|
||||
if (j==search_filename_length) namematch = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Check for a CRC match */
|
||||
if (crc==search_crc) crcmatch = true;
|
||||
|
||||
|
@ -289,7 +289,7 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search
|
|||
found = true;
|
||||
}
|
||||
|
||||
if (found)
|
||||
if (found)
|
||||
{
|
||||
// printf("found %S %d %08x %08x %08x %s %d\n", temp, len, crc, search_crc, size, search_filename, search_filename_length);
|
||||
new_7z->curr_file_idx = i;
|
||||
|
@ -342,13 +342,13 @@ _7z_error _7z_file_open(const char *filename, _7z_file **_7z)
|
|||
|
||||
new_7z->inited = false;
|
||||
new_7z->archiveStream.file._7z_currfpos = 0;
|
||||
|
||||
|
||||
new_7z->archiveStream.file._7z_osdfile = fopen(filename, "rb");
|
||||
if (!new_7z->archiveStream.file._7z_osdfile) {
|
||||
_7zerr = _7ZERR_FILE_ERROR;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
fseek(new_7z->archiveStream.file._7z_osdfile, 0, SEEK_END);
|
||||
new_7z->archiveStream.file._7z_length = ftell(new_7z->archiveStream.file._7z_osdfile);
|
||||
fseek(new_7z->archiveStream.file._7z_osdfile, 0, SEEK_SET);
|
||||
|
@ -367,7 +367,7 @@ _7z_error _7z_file_open(const char *filename, _7z_file **_7z)
|
|||
|
||||
FileInStream_CreateVTable(&new_7z->archiveStream);
|
||||
LookToRead_CreateVTable(&new_7z->lookStream, False);
|
||||
|
||||
|
||||
new_7z->lookStream.realStream = &new_7z->archiveStream.s;
|
||||
LookToRead_Init(&new_7z->lookStream);
|
||||
|
||||
|
@ -481,10 +481,10 @@ _7z_error _7z_file_decompress(_7z_file *new_7z, void *buffer, UINT32 length, UIN
|
|||
&new_7z->blockIndex, &new_7z->outBuffer, &new_7z->outBufferSize,
|
||||
&offset, &outSizeProcessed,
|
||||
&new_7z->allocImp, &new_7z->allocTempImp);
|
||||
|
||||
|
||||
if (res != SZ_OK)
|
||||
return _7ZERR_FILE_ERROR;
|
||||
|
||||
|
||||
*Processed = outSizeProcessed;
|
||||
|
||||
memcpy(buffer, new_7z->outBuffer + offset, length);
|
||||
|
@ -515,7 +515,7 @@ static void free__7z_file(_7z_file *_7z)
|
|||
|
||||
if (_7z->outBuffer) IAlloc_Free(&_7z->allocImp, _7z->outBuffer);
|
||||
if (_7z->inited) SzArEx_Free(&_7z->db, &_7z->allocImp);
|
||||
|
||||
|
||||
|
||||
free(_7z);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
/***************************************************************************
|
||||
Above notices are from MAME
|
||||
|
||||
|
||||
Updated Feb 2012
|
||||
Adapted for use outside MAME by Barry Harris (FB Alpha)
|
||||
***************************************************************************/
|
||||
|
|
|
@ -111,7 +111,7 @@ static struct FBAVI {
|
|||
// compression options
|
||||
COMPVARS compvar; // compression options
|
||||
AVICOMPRESSOPTIONS opts; // compression options
|
||||
// other
|
||||
// other
|
||||
UINT32 nFrameNum; // frame number for each compressed frame
|
||||
LONG nAviSize; // current bytes written, used to break up the avi @ the 2gig mark
|
||||
INT32 nWidth;
|
||||
|
@ -430,7 +430,7 @@ static INT32 AviCreateVidStream()
|
|||
stream in the file because fccHandler is unknown until the
|
||||
compressor is chosen. However, AVISaveOptions() requires
|
||||
the stream to be created prior to the function call.
|
||||
|
||||
|
||||
Solution:
|
||||
Use ICCompressorChoose() to set the COMPVARS, create the
|
||||
video stream in the file using the returned fccHandler,
|
||||
|
@ -440,7 +440,7 @@ static INT32 AviCreateVidStream()
|
|||
|
||||
// initialize COMPVARS
|
||||
memset(&FBAvi.compvar, 0, sizeof(COMPVARS));
|
||||
FBAvi.compvar.cbSize = sizeof(COMPVARS);
|
||||
FBAvi.compvar.cbSize = sizeof(COMPVARS);
|
||||
FBAvi.compvar.dwFlags = ICMF_COMPVARS_VALID;
|
||||
//FBAvi.compvar.fccHandler = comptypeDIB; // default compressor = uncompressed full frames
|
||||
FBAvi.compvar.fccHandler = 0; // default compressor = uncompressed full frames
|
||||
|
@ -509,14 +509,14 @@ static INT32 AviCreateVidStream()
|
|||
FBAvi.opts.dwKeyFrameEvery = FBAvi.compvar.lKey;
|
||||
FBAvi.opts.dwQuality = FBAvi.compvar.lQ;
|
||||
FBAvi.opts.dwBytesPerSecond = FBAvi.compvar.lDataRate * 1024L;
|
||||
FBAvi.opts.dwFlags = AVICOMPRESSF_VALID |
|
||||
FBAvi.opts.dwFlags = AVICOMPRESSF_VALID |
|
||||
(FBAvi.compvar.lDataRate ? AVICOMPRESSF_DATARATE:0L) |
|
||||
(FBAvi.compvar.lKey ? AVICOMPRESSF_KEYFRAMES:0L);
|
||||
FBAvi.opts.lpFormat = &FBAvi.bih;
|
||||
FBAvi.opts.cbFormat = FBAvi.bih.biSize + FBAvi.bih.biClrUsed * sizeof(RGBQUAD);
|
||||
FBAvi.opts.lpParms = FBAvi.compvar.lpState;
|
||||
FBAvi.opts.cbParms = FBAvi.compvar.cbState;
|
||||
FBAvi.opts.dwInterleaveEvery = 0;
|
||||
FBAvi.opts.cbParms = FBAvi.compvar.cbState;
|
||||
FBAvi.opts.dwInterleaveEvery = 0;
|
||||
|
||||
// make the compressed video stream
|
||||
hRet = AVIMakeCompressedStream(
|
||||
|
@ -572,7 +572,7 @@ static INT32 AviCreateAudStream()
|
|||
// - dwInitialFrames specifies how much to skew the
|
||||
// audio data ahead of the video frames in interleaved
|
||||
// files (typically 0.75 sec).
|
||||
//
|
||||
//
|
||||
memset(&FBAvi.audh, 0, sizeof(FBAvi.audh));
|
||||
FBAvi.audh.fccType = streamtypeAUDIO; // stream type
|
||||
FBAvi.audh.dwScale = FBAvi.wfx.nBlockAlign;
|
||||
|
@ -605,7 +605,7 @@ static INT32 AviCreateAudStream()
|
|||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
// fix for shlwapi.h
|
||||
#ifndef _In_
|
||||
#define _In_
|
||||
#define _In_
|
||||
#endif
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
|
|
@ -270,11 +270,11 @@ static int __cdecl BzipBurnLoadRom(unsigned char* Dest, int* pnWrote, int i)
|
|||
_stprintf(szTempName, _T("%s"), FBALoadStringEx(hAppInst, IDS_ERR_UNKNOWN, true));
|
||||
sprintf(pszRomName, "%s", TCHARToANSI(szTempName, NULL, 0));
|
||||
}
|
||||
|
||||
|
||||
TCHAR szTempLoading[100];
|
||||
_stprintf(szTempLoading, _T("%s"), FBALoadStringEx(hAppInst, IDS_PROGRESS_LOADING_ONLY, true));
|
||||
_stprintf(szText, _T("%s"), szTempLoading);
|
||||
|
||||
|
||||
if (ri.nType & (BRF_PRG | BRF_GRA | BRF_SND | BRF_BIOS)) {
|
||||
if (ri.nType & BRF_BIOS) {
|
||||
TCHAR szTempBios[100];
|
||||
|
@ -513,7 +513,7 @@ int BzipOpen(bool bootApp)
|
|||
ZipClose(); // Close the last zip file if open
|
||||
nCurrentZip = -1;
|
||||
}
|
||||
|
||||
|
||||
if (!bootApp) {
|
||||
// Check the roms to see if the code, graphics etc are complete
|
||||
CheckRoms();
|
||||
|
@ -577,30 +577,30 @@ int BzipOpen(bool bootApp)
|
|||
FBAPopupAddText(PUF_TEXT_DEFAULT, _T("\n"));
|
||||
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_LOAD_NODATA));
|
||||
}
|
||||
|
||||
|
||||
// check for hard drive images (assumed max one per game)
|
||||
char *szHDDNameTmp = NULL;
|
||||
BurnDrvGetHDDName(&szHDDNameTmp, 0, 0);
|
||||
|
||||
|
||||
if (szHDDNameTmp) {
|
||||
char *szHddFolderName = NULL;
|
||||
|
||||
|
||||
if (BurnDrvGetTextA(DRV_PARENT)) {
|
||||
szHddFolderName = BurnDrvGetTextA(DRV_PARENT);
|
||||
} else {
|
||||
szHddFolderName = BurnDrvGetTextA(DRV_NAME);
|
||||
}
|
||||
|
||||
|
||||
char szHDDPath[MAX_PATH];
|
||||
sprintf(szHDDPath, "%s%s/%s", _TtoA(szAppHDDPath), szHddFolderName, szHDDNameTmp);
|
||||
|
||||
|
||||
FILE *test = fopen(szHDDPath, "rb");
|
||||
if (test) {
|
||||
fclose(test);
|
||||
} else {
|
||||
FBAPopupAddText(PUF_TEXT_DEFAULT, _T("\n"));
|
||||
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_LOAD_NOHDDDATA));
|
||||
|
||||
|
||||
nBzipError = 1;
|
||||
}
|
||||
}
|
||||
|
@ -611,19 +611,19 @@ int BzipOpen(bool bootApp)
|
|||
// check for hard drive images (assumed max one per game)
|
||||
char *szHDDNameTmp = NULL;
|
||||
BurnDrvGetHDDName(&szHDDNameTmp, 0, 0);
|
||||
|
||||
|
||||
if (szHDDNameTmp) {
|
||||
char *szHddFolderName = NULL;
|
||||
|
||||
|
||||
if (BurnDrvGetTextA(DRV_PARENT)) {
|
||||
szHddFolderName = BurnDrvGetTextA(DRV_PARENT);
|
||||
} else {
|
||||
szHddFolderName = BurnDrvGetTextA(DRV_NAME);
|
||||
}
|
||||
|
||||
|
||||
char szHDDPath[MAX_PATH];
|
||||
sprintf(szHDDPath, "%s%s/%s", _TtoA(szAppHDDPath), szHddFolderName, szHDDNameTmp);
|
||||
|
||||
|
||||
FILE *test = fopen(szHDDPath, "rb");
|
||||
if (test) {
|
||||
fclose(test);
|
||||
|
@ -631,7 +631,7 @@ int BzipOpen(bool bootApp)
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return CheckRomsBoot();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,34 +12,34 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
|
|||
case WM_INITDIALOG: {
|
||||
int i;
|
||||
int nHorSelected = 0, nVerSelected = 0;
|
||||
|
||||
|
||||
for (i = 0; i < MAX_MONITORS; i++) {
|
||||
MonitorIDs[i] = (TCHAR*)malloc(32 * sizeof(TCHAR));
|
||||
memset(MonitorIDs[i], 0, 32 * sizeof(TCHAR));
|
||||
}
|
||||
|
||||
|
||||
DISPLAY_DEVICE dd;
|
||||
ZeroMemory(&dd, sizeof(dd));
|
||||
dd.cb = sizeof(dd);
|
||||
|
||||
|
||||
for (i = 0; EnumDisplayDevices(NULL, i, &dd, 0); i++) {
|
||||
if (dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) {
|
||||
DISPLAY_DEVICE dd2;
|
||||
ZeroMemory(&dd2, sizeof(dd2));
|
||||
dd2.cb = sizeof(dd2);
|
||||
EnumDisplayDevices(dd.DeviceName, 0, &dd2, 0);
|
||||
|
||||
|
||||
// Add to dropdowns
|
||||
TCHAR szTemp[256];
|
||||
_stprintf(szTemp, _T("%s"), dd2.DeviceString);
|
||||
if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) _stprintf(szTemp, _T("%s (default)"), szTemp);
|
||||
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_CHOOSE_MONITOR_HOR_LIST, CB_ADDSTRING, 0, (LPARAM)&szTemp);
|
||||
SendDlgItemMessage(hDlg, IDC_CHOOSE_MONITOR_VER_LIST, CB_ADDSTRING, 0, (LPARAM)&szTemp);
|
||||
|
||||
|
||||
// Store id for later
|
||||
_stprintf(MonitorIDs[i], _T("%s"), dd.DeviceName);
|
||||
|
||||
|
||||
// Select if this is our value or the default
|
||||
if (nHorSelected == 0) {
|
||||
if (!_tcsicmp(HorScreen, MonitorIDs[i])) {
|
||||
|
@ -49,7 +49,7 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
|
|||
if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) SendDlgItemMessage(hDlg, IDC_CHOOSE_MONITOR_HOR_LIST, CB_SETCURSEL, i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (nVerSelected == 0) {
|
||||
if (!_tcsicmp(VerScreen, MonitorIDs[i])) {
|
||||
nVerSelected = 1;
|
||||
|
@ -60,12 +60,12 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WndInMid(hDlg, hScrnWnd);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_COMMAND: {
|
||||
if (LOWORD(wParam) == IDOK) {
|
||||
bOK = 1;
|
||||
|
@ -76,13 +76,13 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_CLOSE: {
|
||||
if (bOK) {
|
||||
// save selected values
|
||||
int nItem = (int)SendDlgItemMessage(hDlg, IDC_CHOOSE_MONITOR_HOR_LIST, CB_GETCURSEL, 0, 0);
|
||||
if (MonitorIDs[(int)nItem]) _stprintf(HorScreen, _T("%s"), MonitorIDs[(int)nItem]);
|
||||
|
||||
|
||||
nItem = (int)SendDlgItemMessage(hDlg, IDC_CHOOSE_MONITOR_VER_LIST, CB_GETCURSEL, 0, 0);
|
||||
if (MonitorIDs[(int)nItem]) _stprintf(VerScreen, _T("%s"), MonitorIDs[(int)nItem]);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ int ConfigAppLoad()
|
|||
TCHAR szConfig[MAX_PATH];
|
||||
TCHAR szLine[1024];
|
||||
FILE* h;
|
||||
|
||||
|
||||
#ifdef _UNICODE
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
@ -104,7 +104,7 @@ int ConfigAppLoad()
|
|||
FLT(nGamma);
|
||||
VAR(bVidFullStretch);
|
||||
VAR(bVidCorrectAspect);
|
||||
|
||||
|
||||
VAR(bVidAutoSwitchFull);
|
||||
STR(HorScreen);
|
||||
STR(VerScreen);
|
||||
|
@ -147,7 +147,7 @@ int ConfigAppLoad()
|
|||
// DirectX Graphics blitter
|
||||
FLT(dVidCubicB);
|
||||
FLT(dVidCubicC);
|
||||
|
||||
|
||||
// DirectX Graphics 9 Alt blitter
|
||||
VAR(bVidDX9Bilinear);
|
||||
VAR(bVidHardwareVertex);
|
||||
|
@ -183,7 +183,7 @@ int ConfigAppLoad()
|
|||
VAR(bAlwaysProcessKeyboardInput);
|
||||
VAR(bAutoPause);
|
||||
VAR(bSaveInputs);
|
||||
|
||||
|
||||
VAR(nCDEmuSelect);
|
||||
PAT(CDEmuImage);
|
||||
|
||||
|
@ -217,9 +217,9 @@ int ConfigAppLoad()
|
|||
STR(szAppRomPaths[17]);
|
||||
STR(szAppRomPaths[18]);
|
||||
STR(szAppRomPaths[19]);
|
||||
|
||||
|
||||
STR(szNeoCDGamesDir);
|
||||
|
||||
|
||||
STR(szAppPreviewsPath);
|
||||
STR(szAppTitlesPath);
|
||||
STR(szAppCheatsPath);
|
||||
|
@ -242,14 +242,14 @@ int ConfigAppLoad()
|
|||
STR(szAppPCBsPath);
|
||||
STR(szAppHistoryPath);
|
||||
STR(szAppEEPROMPath);
|
||||
|
||||
|
||||
VAR(bEnableHighResTimer);
|
||||
VAR(bNoChangeNumLock);
|
||||
VAR(bAlwaysCreateSupportFolders);
|
||||
VAR(bAutoLoadGameList);
|
||||
|
||||
|
||||
VAR(nAutoFireRate);
|
||||
|
||||
|
||||
VAR(EnableHiscores);
|
||||
VAR(bBurnUseBlend);
|
||||
VAR(BurnShiftEnabled);
|
||||
|
@ -258,13 +258,13 @@ int ConfigAppLoad()
|
|||
#ifdef INCLUDE_AVI_RECORDING
|
||||
VAR(nAvi3x);
|
||||
#endif
|
||||
|
||||
|
||||
VAR(nIpsSelectedLanguage);
|
||||
|
||||
|
||||
VAR(bEnableIcons);
|
||||
VAR(bIconsOnlyParents);
|
||||
VAR(nIconsSize);
|
||||
|
||||
|
||||
STR(szPrevGames[0]);
|
||||
STR(szPrevGames[1]);
|
||||
STR(szPrevGames[2]);
|
||||
|
@ -275,7 +275,7 @@ int ConfigAppLoad()
|
|||
STR(szPrevGames[7]);
|
||||
STR(szPrevGames[8]);
|
||||
STR(szPrevGames[9]);
|
||||
|
||||
|
||||
// MVS cartridges
|
||||
DRV(nBurnDrvSelect[0]);
|
||||
DRV(nBurnDrvSelect[1]);
|
||||
|
@ -283,7 +283,7 @@ int ConfigAppLoad()
|
|||
DRV(nBurnDrvSelect[3]);
|
||||
DRV(nBurnDrvSelect[4]);
|
||||
DRV(nBurnDrvSelect[5]);
|
||||
|
||||
|
||||
VAR(bNeoCDListScanSub);
|
||||
VAR(bNeoCDListScanOnlyISO);
|
||||
|
||||
|
@ -318,7 +318,7 @@ int ConfigAppSave()
|
|||
if (bCmdOptUsed & 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _UNICODE
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
@ -359,7 +359,7 @@ int ConfigAppSave()
|
|||
|
||||
// Horizontal oriented
|
||||
_ftprintf(h, _T("\n// (Horizontal Oriented) The display mode to use for fullscreen\n"));
|
||||
VAR(nVidHorWidth); VAR(nVidHorHeight);
|
||||
VAR(nVidHorWidth); VAR(nVidHorHeight);
|
||||
_ftprintf(h, _T("\n// (Horizontal Oriented) If non-zero, use the same fullscreen resolution as the original arcade game\n"));
|
||||
VAR(bVidArcaderesHor);
|
||||
_ftprintf(h, _T("\n// (Horizontal Oriented) The preset resolutions appearing in the menu\n"));
|
||||
|
@ -510,19 +510,19 @@ int ConfigAppSave()
|
|||
|
||||
_ftprintf(h, _T("\n\n\n"));
|
||||
_ftprintf(h, _T("// --- UI ---------------------------------------------------------------------\n"));
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The filename of the placeholder image to use (empty filename = use built-in)\n"));
|
||||
STR(szPlaceHolder);
|
||||
|
||||
_ftprintf(h, _T("\n// Filename of the active UI translation template\n"));
|
||||
STR(szLocalisationTemplate);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Filename of the active gamelist translation template\n"));
|
||||
STR(szGamelistLocalisationTemplate);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, enable gamelist localisation\n"));
|
||||
VAR(nGamelistLocalisationActive);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// 1 = display pause/record/replay/kaillera icons in the upper right corner of the display\n"));
|
||||
VAR(nVidSDisplayStatus);
|
||||
_ftprintf(h, _T("\n// Minimum height (in pixels) of the font used for the Kaillera chat function (used for arcade resolution)\n"));
|
||||
|
@ -546,37 +546,37 @@ int ConfigAppSave()
|
|||
VAR(bAutoPause);
|
||||
_ftprintf(h, _T("\n// If non-zero, save the inputs for each game\n"));
|
||||
VAR(bSaveInputs);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n\n\n"));
|
||||
_ftprintf(h, _T("// --- CD emulation -----------------------------------------------------------\n"));
|
||||
_ftprintf(h, _T("\n // The selected CD emulation module\n"));
|
||||
VAR(nCDEmuSelect);
|
||||
_ftprintf(h, _T("\n // The path to the CD image to use (.cue or .iso)\n"));
|
||||
STR(CDEmuImage);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n\n\n"));
|
||||
_ftprintf(h, _T("// --- Load Game Dialogs ------------------------------------------------------\n"));
|
||||
_ftprintf(h, _T("\n// Load game dialog dimensions (in win32 client co-ordinates)\n"));
|
||||
VAR(nSelDlgWidth);
|
||||
VAR(nSelDlgHeight);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Load game dialog options\n"));
|
||||
VAR(nLoadMenuShowX);
|
||||
VAR(nLoadMenuShowY);
|
||||
VAR(nLoadMenuExpand);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Load game dialog board type filter options\n"));
|
||||
VAR(nLoadMenuBoardTypeFilter);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Load game dialog genre filter options\n"));
|
||||
VAR(nLoadMenuGenreFilter);
|
||||
|
||||
_ftprintf(h, _T("\n// Load game dialog favorites filter options\n"));
|
||||
VAR(nLoadMenuFavoritesFilter);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Load game dialog family filter options\n"));
|
||||
VAR(nLoadMenuFamilyFilter);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The paths to search for rom zips (include trailing backslash)\n"));
|
||||
STR(szAppRomPaths[0]);
|
||||
STR(szAppRomPaths[1]);
|
||||
|
@ -598,10 +598,10 @@ int ConfigAppSave()
|
|||
STR(szAppRomPaths[17]);
|
||||
STR(szAppRomPaths[18]);
|
||||
STR(szAppRomPaths[19]);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The path to search for Neo Geo CDZ isos\n"));
|
||||
STR(szNeoCDGamesDir);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The paths to search for support files (include trailing backslash)\n"));
|
||||
STR(szAppPreviewsPath);
|
||||
STR(szAppTitlesPath);
|
||||
|
@ -625,7 +625,7 @@ int ConfigAppSave()
|
|||
STR(szAppPCBsPath);
|
||||
STR(szAppHistoryPath);
|
||||
STR(szAppEEPROMPath);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The cartridges to use for emulation of an MVS system\n"));
|
||||
DRV(nBurnDrvSelect[0]);
|
||||
DRV(nBurnDrvSelect[1]);
|
||||
|
@ -633,7 +633,7 @@ int ConfigAppSave()
|
|||
DRV(nBurnDrvSelect[3]);
|
||||
DRV(nBurnDrvSelect[4]);
|
||||
DRV(nBurnDrvSelect[5]);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Neo Geo CD Load Game Dialog options\n"));
|
||||
VAR(bNeoCDListScanSub);
|
||||
VAR(bNeoCDListScanOnlyISO);
|
||||
|
@ -646,19 +646,19 @@ int ConfigAppSave()
|
|||
|
||||
_ftprintf(h, _T("\n// If non-zero, don't change the status of the Num Lock key.\n"));
|
||||
VAR(bNoChangeNumLock);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, create support folders at program start.\n"));
|
||||
VAR(bAlwaysCreateSupportFolders);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, load game selection dialog at program start.\n"));
|
||||
VAR(bAutoLoadGameList);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Auto-Fire Rate, non-linear - use the GUI to change this setting!\n"));
|
||||
VAR(nAutoFireRate);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, enable high score saving support.\n"));
|
||||
VAR(EnableHiscores);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, enable alpha blending support.\n"));
|
||||
VAR(bBurnUseBlend);
|
||||
|
||||
|
@ -667,15 +667,15 @@ int ConfigAppSave()
|
|||
|
||||
_ftprintf(h, _T("\n// If non-zero, DISABLE start-up rom scan (if needed).\n"));
|
||||
VAR(bSkipStartupCheck);
|
||||
|
||||
|
||||
#ifdef INCLUDE_AVI_RECORDING
|
||||
_ftprintf(h, _T("\n// If non-zero, enable 1x - 3x pixel output for the AVI writer.\n"));
|
||||
VAR(nAvi3x);
|
||||
#endif
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// The language index to use for the IPS Patch Manager dialog.\n"));
|
||||
VAR(nIpsSelectedLanguage);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// If non-zero, display drivers icons.\n"));
|
||||
VAR(bEnableIcons);
|
||||
|
||||
|
@ -684,7 +684,7 @@ int ConfigAppSave()
|
|||
|
||||
_ftprintf(h, _T("\n// Specify icons display size, 0 = 16x16 , 1 = 24x24, 2 = 32x32.\n"));
|
||||
VAR(nIconsSize);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Previous games list.\n"));
|
||||
STR(szPrevGames[0]);
|
||||
STR(szPrevGames[1]);
|
||||
|
@ -696,7 +696,7 @@ int ConfigAppSave()
|
|||
STR(szPrevGames[7]);
|
||||
STR(szPrevGames[8]);
|
||||
STR(szPrevGames[9]);
|
||||
|
||||
|
||||
_ftprintf(h, _T("\n// Player default controls, number is the index of the configuration in the input dialog\n"));
|
||||
VAR(nPlayerDefaultControls[0]);
|
||||
STR(szPlayerDefaultIni[0]);
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
int bDrvOkay = 0; // 1 if the Driver has been initted okay, and it's okay to use the BurnDrv functions
|
||||
|
||||
TCHAR szAppRomPaths[DIRS_MAX][MAX_PATH] = { { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") },
|
||||
{ _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("spectrum") },
|
||||
TCHAR szAppRomPaths[DIRS_MAX][MAX_PATH] = { { _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("") },
|
||||
{ _T("") }, { _T("") }, { _T("") }, { _T("") }, { _T("spectrum") },
|
||||
{ _T("msx/") }, { _T("sms/") }, { _T("gamegear/") }, { _T("sg1000/") }, { _T("coleco/") },
|
||||
{ _T("tg16/") }, { _T("sgx/") }, { _T("pce/") }, { _T("megadriv/") }, { _T("roms/") } };
|
||||
|
||||
|
@ -46,7 +46,7 @@ static int DrvBzipOpen()
|
|||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int DoLibInit() // Do Init of Burn library driver
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ static int DoLibInit() // Do Init of Burn library driver
|
|||
if (DrvBzipOpen()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) != HARDWARE_SNK_MVS) {
|
||||
if (!bQuietLoading) ProgressCreate();
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ static int __cdecl DrvLoadRom(unsigned char* Dest, int* pnWrote, int i)
|
|||
char* pszFilename;
|
||||
|
||||
BurnDrvGetRomName(&pszFilename, i, 0);
|
||||
|
||||
|
||||
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_LOAD_REQUEST), pszFilename, BurnDrvGetText(DRV_NAME));
|
||||
FBAPopupDisplay(PUF_TYPE_ERROR);
|
||||
}
|
||||
|
@ -142,12 +142,12 @@ static void NeoCDZRateChange()
|
|||
int DrvInit(int nDrvNum, bool bRestore)
|
||||
{
|
||||
int nStatus;
|
||||
|
||||
|
||||
DrvExit(); // Make sure exitted
|
||||
MediaExit();
|
||||
|
||||
nBurnDrvActive = nDrvNum; // Set the driver number
|
||||
|
||||
|
||||
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_SNK_MVS) {
|
||||
|
||||
BurnExtCartridgeSetupCallback = DrvCartridgeAccess;
|
||||
|
@ -184,7 +184,7 @@ int DrvInit(int nDrvNum, bool bRestore)
|
|||
|
||||
if(ConfigGameLoad(true)) {
|
||||
ConfigGameLoadHardwareDefaults();
|
||||
}
|
||||
}
|
||||
InputMake(true);
|
||||
GameInpDefault();
|
||||
|
||||
|
@ -240,7 +240,7 @@ int DrvInit(int nDrvNum, bool bRestore)
|
|||
}
|
||||
|
||||
nBurnLayer = 0xFF; // show all layers
|
||||
|
||||
|
||||
// Reset the speed throttling code, so we don't 'jump' after the load
|
||||
RunReset();
|
||||
|
||||
|
@ -282,7 +282,7 @@ int DrvExit()
|
|||
ConfigGameSave(bSaveInputs);
|
||||
|
||||
GameInpExit(); // Exit game input
|
||||
|
||||
|
||||
BurnDrvExit(); // Exit the driver
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ int DrvExit()
|
|||
// Write silence into the sound buffer on exit, and for drivers which don't use pBurnSoundOut
|
||||
memset(nAudNextSound, 0, nAudSegLen << 2);
|
||||
}
|
||||
|
||||
|
||||
CDEmuExit();
|
||||
|
||||
BurnExtCartridgeSetupCallback = NULL;
|
||||
|
|
|
@ -49,36 +49,36 @@ static void SetPreview(TCHAR* szPreviewDir, int nAspectFlag)
|
|||
DeleteObject((HGDIOBJ)hGiBmp);
|
||||
hGiBmp = NULL;
|
||||
}
|
||||
|
||||
|
||||
// get image dimensions and work out what to resize to (default to 4:3)
|
||||
IMAGE img = { 0, 0, 0, 0, NULL, NULL, 0};
|
||||
int img_width = IMG_DEFAULT_WIDTH;
|
||||
int img_height = IMG_MAX_HEIGHT;
|
||||
|
||||
|
||||
FILE *fp = OpenPreview(szPreviewDir);
|
||||
if (fp) {
|
||||
PNGGetInfo(&img, fp);
|
||||
|
||||
|
||||
// vertical 3:4
|
||||
if (img.height > img.width) {
|
||||
img_width = IMG_DEFAULT_WIDTH_V;
|
||||
}
|
||||
|
||||
|
||||
// preserve aspect support
|
||||
if (nAspectFlag == IMG_ASPECT_PRESERVE) {
|
||||
double nAspect = (double)img.width / img.height;
|
||||
img_width = (int)((double)IMG_MAX_HEIGHT * nAspect);
|
||||
|
||||
|
||||
if (img_width > IMG_MAX_WIDTH) {
|
||||
img_width = IMG_MAX_WIDTH;
|
||||
img_height = (int)((double)IMG_MAX_WIDTH / nAspect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
img_free(&img);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
fp = OpenPreview(szPreviewDir);
|
||||
if (fp) {
|
||||
hNewImage = PNGLoadBitmap(hDlg, fp, img_width, img_height, 3);
|
||||
|
@ -114,7 +114,7 @@ static int DisplayRomInfo()
|
|||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_MESSAGE_EDIT_ENG), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST1), SW_SHOW);
|
||||
UpdateWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ static int DisplayHDDInfo()
|
|||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_MESSAGE_EDIT_ENG), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST3), SW_SHOW);
|
||||
UpdateWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ static int DisplaySampleInfo()
|
|||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_MESSAGE_EDIT_ENG), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST2), SW_SHOW);
|
||||
UpdateWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ static int DisplayHistory()
|
|||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST3), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_MESSAGE_EDIT_ENG), SW_SHOW);
|
||||
UpdateWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ static int GameInfoInit()
|
|||
TCHAR* pszName = BurnDrvGetText(DRV_FULLNAME);
|
||||
|
||||
pszPosition += _sntprintf(szText, 1024, pszName);
|
||||
|
||||
|
||||
pszName = BurnDrvGetText(DRV_FULLNAME);
|
||||
while ((pszName = BurnDrvGetText(DRV_NEXTNAME | DRV_FULLNAME)) != NULL) {
|
||||
if (pszPosition + _tcslen(pszName) - 1024 > szText) {
|
||||
|
@ -172,21 +172,21 @@ static int GameInfoInit()
|
|||
}
|
||||
pszPosition += _stprintf(pszPosition, _T(SEPERATOR_2) _T("%s"), pszName);
|
||||
}
|
||||
|
||||
|
||||
_tcscpy(szFullName, szText);
|
||||
|
||||
|
||||
_stprintf(szText, _T("%s") _T(SEPERATOR_1) _T("%s"), FBALoadStringEx(hAppInst, IDS_GAMEINFO_DIALOGTITLE, true), szFullName);
|
||||
|
||||
|
||||
// Set the window caption
|
||||
SetWindowText(hGameInfoDlg, szText);
|
||||
|
||||
|
||||
// Setup the tabs
|
||||
hTabControl = GetDlgItem(hGameInfoDlg, IDC_TAB1);
|
||||
TC_ITEM TCI;
|
||||
TCI.mask = TCIF_TEXT;
|
||||
TC_ITEM TCI;
|
||||
TCI.mask = TCIF_TEXT;
|
||||
|
||||
UINT idsString[17] = { IDS_GAMEINFO_ROMINFO, IDS_GAMEINFO_HDD, IDS_GAMEINFO_SAMPLES, IDS_GAMEINFO_HISTORY, IDS_GAMEINFO_INGAME, IDS_GAMEINFO_TITLE, IDS_GAMEINFO_SELECT, IDS_GAMEINFO_VERSUS, IDS_GAMEINFO_HOWTO, IDS_GAMEINFO_SCORES, IDS_GAMEINFO_BOSSES, IDS_GAMEINFO_GAMEOVER, IDS_GAMEINFO_FLYER, IDS_GAMEINFO_CABINET, IDS_GAMEINFO_MARQUEE, IDS_GAMEINFO_CONTROLS, IDS_GAMEINFO_PCB };
|
||||
|
||||
|
||||
for(int i = 0; i < 17; i++) {
|
||||
TCI.pszText = FBALoadStringEx(hAppInst, idsString[i], true);
|
||||
SendMessage(hTabControl, TCM_INSERTITEM, (WPARAM) i, (LPARAM) &TCI);
|
||||
|
@ -194,7 +194,7 @@ static int GameInfoInit()
|
|||
|
||||
// Load the preview image
|
||||
hPreview = LoadBitmap(hAppInst, MAKEINTRESOURCE(BMP_SPLASH));
|
||||
|
||||
|
||||
// Display preview image
|
||||
SendDlgItemMessage(hGameInfoDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
SendDlgItemMessage(hGameInfoDlg, IDC_SCREENSHOT_V, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
|
@ -212,12 +212,12 @@ static int GameInfoInit()
|
|||
|
||||
nBurnDrvActive = nGiDriverSelected;
|
||||
DisplayRomInfo();
|
||||
|
||||
|
||||
// Display the game title
|
||||
TCHAR szItemText[1024];
|
||||
HWND hInfoControl = GetDlgItem(hGameInfoDlg, IDC_TEXTCOMMENT);
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szFullName);
|
||||
|
||||
|
||||
// Display the romname
|
||||
bool bBracket = false;
|
||||
hInfoControl = GetDlgItem(hGameInfoDlg, IDC_TEXTROMNAME);
|
||||
|
@ -254,7 +254,7 @@ static int GameInfoInit()
|
|||
_stprintf(szItemText + _tcslen(szItemText), _T(")"));
|
||||
}
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szItemText);
|
||||
|
||||
|
||||
//Display the rom info
|
||||
bool bUseInfo = false;
|
||||
szItemText[0] = _T('\0');
|
||||
|
@ -274,7 +274,7 @@ static int GameInfoInit()
|
|||
if (BurnDrvGetFlags() & BDF_HOMEBREW) {
|
||||
_stprintf(szItemText + _tcslen(szItemText), FBALoadStringEx(hAppInst, IDS_SEL_HOMEBREW, true), bUseInfo ? _T(", ") : _T(""));
|
||||
bUseInfo = true;
|
||||
}
|
||||
}
|
||||
if (BurnDrvGetFlags() & BDF_DEMO) {
|
||||
_stprintf(szItemText + _tcslen(szItemText), FBALoadStringEx(hAppInst, IDS_SEL_DEMO, true), bUseInfo ? _T(", ") : _T(""));
|
||||
bUseInfo = true;
|
||||
|
@ -289,7 +289,7 @@ static int GameInfoInit()
|
|||
bUseInfo = true;
|
||||
}
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szItemText);
|
||||
|
||||
|
||||
// Display the release info
|
||||
szItemText[0] = _T('\0');
|
||||
hInfoControl = GetDlgItem(hGameInfoDlg, IDC_TEXTSYSTEM);
|
||||
|
@ -299,7 +299,7 @@ static int GameInfoInit()
|
|||
_stprintf(szCartridge, FBALoadStringEx(hAppInst, IDS_MVS_CARTRIDGE, true));
|
||||
_stprintf(szItemText, FBALoadStringEx(hAppInst, IDS_HARDWARE_DESC, true), BurnDrvGetTextA(DRV_MANUFACTURER) ? BurnDrvGetText(DRV_MANUFACTURER) : szUnknown, BurnDrvGetText(DRV_DATE), (((BurnDrvGetHardwareCode() & HARDWARE_SNK_MVS) == HARDWARE_SNK_MVS) && ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK)) == HARDWARE_SNK_NEOGEO)? szCartridge : BurnDrvGetText(DRV_SYSTEM));
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szItemText);
|
||||
|
||||
|
||||
// Display any comments
|
||||
szItemText[0] = _T('\0');
|
||||
hInfoControl = GetDlgItem(hGameInfoDlg, IDC_TEXTNOTES);
|
||||
|
@ -308,39 +308,39 @@ static int GameInfoInit()
|
|||
_stprintf(szItemText + _tcslen(szItemText), _T("%shigh scores supported"), _tcslen(szItemText) ? _T(", ") : _T(""));
|
||||
}
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szItemText);
|
||||
|
||||
|
||||
// Display the genre
|
||||
szItemText[0] = _T('\0');
|
||||
hInfoControl = GetDlgItem(hGameInfoDlg, IDC_TEXTGENRE);
|
||||
_stprintf(szItemText, _T("%s"), DecorateGenreInfo());
|
||||
SendMessage(hInfoControl, WM_SETTEXT, (WPARAM)0, (LPARAM)szItemText);
|
||||
|
||||
|
||||
// Set up the rom info list
|
||||
HWND hList = GetDlgItem(hGameInfoDlg, IDC_LIST1);
|
||||
LV_COLUMN LvCol;
|
||||
LV_ITEM LvItem;
|
||||
|
||||
|
||||
ListView_SetExtendedListViewStyle(hList, LVS_EX_FULLROWSELECT);
|
||||
|
||||
|
||||
memset(&LvCol, 0, sizeof(LvCol));
|
||||
LvCol.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||
LvCol.cx = 200;
|
||||
LvCol.pszText = _T("Name");
|
||||
LvCol.pszText = _T("Name");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 0, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
LvCol.pszText = _T("Size (bytes)");
|
||||
LvCol.pszText = _T("Size (bytes)");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 1, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
LvCol.pszText = _T("CRC32");
|
||||
LvCol.pszText = _T("CRC32");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 2, (LPARAM)&LvCol);
|
||||
LvCol.cx = 200;
|
||||
LvCol.pszText = _T("Type");
|
||||
LvCol.pszText = _T("Type");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 3, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
LvCol.pszText = _T("Flags");
|
||||
LvCol.pszText = _T("Flags");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 4, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
|
||||
|
||||
memset(&LvItem, 0, sizeof(LvItem));
|
||||
LvItem.mask= LVIF_TEXT;
|
||||
LvItem.cchTextMax = 256;
|
||||
|
@ -358,61 +358,61 @@ static int GameInfoInit()
|
|||
|
||||
nRet = BurnDrvGetRomInfo(&ri, i);
|
||||
nRet += BurnDrvGetRomName(&szRomName, i, 0);
|
||||
|
||||
if (ri.nLen == 0) continue;
|
||||
|
||||
if (ri.nLen == 0) continue;
|
||||
if (ri.nType & BRF_BIOS) continue;
|
||||
|
||||
|
||||
LvItem.iItem = RomPos;
|
||||
LvItem.iSubItem = 0;
|
||||
LvItem.pszText = ANSIToTCHAR(szRomName, NULL, 0);
|
||||
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nLen, "%d", ri.nLen);
|
||||
LvItem.iSubItem = 1;
|
||||
LvItem.pszText = ANSIToTCHAR(nLen, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nCrc, "%08X", ri.nCrc);
|
||||
if (!(ri.nType & BRF_NODUMP)) {
|
||||
LvItem.iSubItem = 2;
|
||||
LvItem.pszText = ANSIToTCHAR(nCrc, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
}
|
||||
|
||||
|
||||
if (ri.nType & BRF_ESS) sprintf(Type, "%s, Essential", Type);
|
||||
if (ri.nType & BRF_OPT) sprintf(Type, "%s, Optional", Type);
|
||||
if (ri.nType & BRF_PRG) sprintf(Type, "%s, Program", Type);
|
||||
if (ri.nType & BRF_GRA) sprintf(Type, "%s, Graphics", Type);
|
||||
if (ri.nType & BRF_SND) sprintf(Type, "%s, Sound", Type);
|
||||
if (ri.nType & BRF_BIOS) sprintf(Type, "%s, BIOS", Type);
|
||||
|
||||
|
||||
for (int j = 0; j < 98; j++) {
|
||||
FormatType[j] = Type[j + 2];
|
||||
}
|
||||
|
||||
|
||||
LvItem.iSubItem = 3;
|
||||
LvItem.pszText = ANSIToTCHAR(FormatType, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
LvItem.iSubItem = 4;
|
||||
LvItem.pszText = _T("");
|
||||
if (ri.nType & BRF_NODUMP) LvItem.pszText = _T("No Dump");
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
RomPos++;
|
||||
}
|
||||
|
||||
|
||||
// Check for board roms
|
||||
if (BurnDrvGetTextA(DRV_BOARDROM)) {
|
||||
char szBoardName[12] = "";
|
||||
unsigned int nOldDrvSelect = nBurnDrvActive;
|
||||
strcpy(szBoardName, BurnDrvGetTextA(DRV_BOARDROM));
|
||||
|
||||
|
||||
for (unsigned int i = 0; i < nBurnDrvCount; i++) {
|
||||
nBurnDrvActive = i;
|
||||
if (!strcmp(szBoardName, BurnDrvGetTextA(DRV_NAME))) break;
|
||||
}
|
||||
|
||||
|
||||
for (int j = 0; j < 0x100; j++) {
|
||||
int nRetBoard;
|
||||
struct BurnRomInfo riBoard;
|
||||
|
@ -426,63 +426,63 @@ static int GameInfoInit()
|
|||
|
||||
nRetBoard = BurnDrvGetRomInfo(&riBoard, j);
|
||||
nRetBoard += BurnDrvGetRomName(&szBoardRomName, j, 0);
|
||||
|
||||
|
||||
if (riBoard.nLen == 0) continue;
|
||||
|
||||
|
||||
LvItem.iItem = RomPos;
|
||||
LvItem.iSubItem = 0;
|
||||
LvItem.pszText = ANSIToTCHAR(szBoardRomName, NULL, 0);
|
||||
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nLenBoard, "%d", riBoard.nLen);
|
||||
LvItem.iSubItem = 1;
|
||||
LvItem.pszText = ANSIToTCHAR(nLenBoard, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nCrcBoard, "%08X", riBoard.nCrc);
|
||||
if (!(riBoard.nType & BRF_NODUMP)) {
|
||||
LvItem.iSubItem = 2;
|
||||
LvItem.pszText = ANSIToTCHAR(nCrcBoard, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
}
|
||||
|
||||
|
||||
if (riBoard.nType & BRF_ESS) sprintf(BoardType, "%s, Essential", BoardType);
|
||||
if (riBoard.nType & BRF_OPT) sprintf(BoardType, "%s, Optional", BoardType);
|
||||
if (riBoard.nType & BRF_PRG) sprintf(BoardType, "%s, Program", BoardType);
|
||||
if (riBoard.nType & BRF_GRA) sprintf(BoardType, "%s, Graphics", BoardType);
|
||||
if (riBoard.nType & BRF_SND) sprintf(BoardType, "%s, Sound", BoardType);
|
||||
if (riBoard.nType & BRF_BIOS) sprintf(BoardType, "%s, BIOS", BoardType);
|
||||
|
||||
|
||||
for (int k = 0; k < 98; k++) {
|
||||
BoardFormatType[k] = BoardType[k + 2];
|
||||
}
|
||||
|
||||
|
||||
LvItem.iSubItem = 3;
|
||||
LvItem.pszText = ANSIToTCHAR(BoardFormatType, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
LvItem.iSubItem = 4;
|
||||
LvItem.pszText = _T("");
|
||||
if (riBoard.nType & BRF_NODUMP) LvItem.pszText = _T("No Dump");
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
RomPos++;
|
||||
}
|
||||
|
||||
|
||||
nBurnDrvActive = nOldDrvSelect;
|
||||
}
|
||||
|
||||
|
||||
// Set up the sample info list
|
||||
hList = GetDlgItem(hGameInfoDlg, IDC_LIST2);
|
||||
|
||||
|
||||
ListView_SetExtendedListViewStyle(hList, LVS_EX_FULLROWSELECT);
|
||||
|
||||
|
||||
memset(&LvCol, 0, sizeof(LvCol));
|
||||
LvCol.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||
LvCol.cx = 200;
|
||||
LvCol.pszText = _T("Name");
|
||||
LvCol.pszText = _T("Name");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 0, (LPARAM)&LvCol);
|
||||
|
||||
|
||||
memset(&LvItem, 0, sizeof(LvItem));
|
||||
LvItem.mask= LVIF_TEXT;
|
||||
LvItem.cchTextMax = 256;
|
||||
|
@ -497,36 +497,36 @@ static int GameInfoInit()
|
|||
|
||||
nRet = BurnDrvGetSampleInfo(&si, i);
|
||||
nRet += BurnDrvGetSampleName(&szSampleName, i, 0);
|
||||
|
||||
if (si.nFlags == 0) continue;
|
||||
|
||||
|
||||
if (si.nFlags == 0) continue;
|
||||
|
||||
LvItem.iItem = SamplePos;
|
||||
LvItem.iSubItem = 0;
|
||||
LvItem.pszText = ANSIToTCHAR(szSampleName, NULL, 0);
|
||||
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
SamplePos++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set up the hdd info list
|
||||
hList = GetDlgItem(hGameInfoDlg, IDC_LIST3);
|
||||
|
||||
|
||||
ListView_SetExtendedListViewStyle(hList, LVS_EX_FULLROWSELECT);
|
||||
|
||||
|
||||
memset(&LvCol, 0, sizeof(LvCol));
|
||||
LvCol.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
|
||||
LvCol.cx = 200;
|
||||
LvCol.pszText = _T("Name");
|
||||
LvCol.pszText = _T("Name");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 0, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
LvCol.pszText = _T("Size (bytes)");
|
||||
LvCol.pszText = _T("Size (bytes)");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 1, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
LvCol.pszText = _T("CRC32");
|
||||
LvCol.pszText = _T("CRC32");
|
||||
SendMessage(hList, LVM_INSERTCOLUMN , 2, (LPARAM)&LvCol);
|
||||
LvCol.cx = 100;
|
||||
|
||||
|
||||
memset(&LvItem, 0, sizeof(LvItem));
|
||||
LvItem.mask= LVIF_TEXT;
|
||||
LvItem.cchTextMax = 256;
|
||||
|
@ -542,32 +542,32 @@ static int GameInfoInit()
|
|||
|
||||
nRet = BurnDrvGetHDDInfo(&hddi, i);
|
||||
nRet += BurnDrvGetHDDName(&szHDDName, i, 0);
|
||||
|
||||
if (hddi.nLen == 0) continue;
|
||||
|
||||
|
||||
if (hddi.nLen == 0) continue;
|
||||
|
||||
LvItem.iItem = HDDPos;
|
||||
LvItem.iSubItem = 0;
|
||||
LvItem.pszText = ANSIToTCHAR(szHDDName, NULL, 0);
|
||||
SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nLen, "%d", hddi.nLen);
|
||||
LvItem.iSubItem = 1;
|
||||
LvItem.pszText = ANSIToTCHAR(nLen, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
sprintf(nCrc, "%08X", hddi.nCrc);
|
||||
LvItem.iSubItem = 2;
|
||||
LvItem.pszText = ANSIToTCHAR(nCrc, NULL, 0);
|
||||
SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem);
|
||||
|
||||
|
||||
HDDPos++;
|
||||
}
|
||||
|
||||
|
||||
// Get the history info
|
||||
CHAR szFileName[MAX_PATH] = "";
|
||||
sprintf(szFileName, "%shistory.dat", TCHARToANSI(szAppHistoryPath, NULL, 0));
|
||||
|
||||
FILE *fp = fopen(szFileName, "rt");
|
||||
|
||||
FILE *fp = fopen(szFileName, "rt");
|
||||
char Temp[10000];
|
||||
int inGame = 0;
|
||||
|
||||
|
@ -576,11 +576,11 @@ static int GameInfoInit()
|
|||
#else
|
||||
TCHAR szBuffer[50000] = _T("{\\rtf1\\ansi{\\fonttbl(\\f0\\fnil\\fcharset0 Segoe UI;)}{\\colortbl;\\red220\\green0\\blue0;\\red0\\green0\\blue0;}");
|
||||
#endif
|
||||
|
||||
if (fp) {
|
||||
|
||||
if (fp) {
|
||||
while (!feof(fp)) {
|
||||
char *Tokens;
|
||||
|
||||
|
||||
fgets(Temp, 10000, fp);
|
||||
if (!strncmp("$info=", Temp, 6)) {
|
||||
Tokens = strtok(Temp, "=,");
|
||||
|
@ -593,25 +593,25 @@ static int GameInfoInit()
|
|||
Tokens = strtok(NULL, "=,");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (inGame) {
|
||||
int nTitleWrote = 0;
|
||||
while (strncmp("$end", Temp, 4)) {
|
||||
fgets(Temp, 10000, fp);
|
||||
|
||||
if (!strncmp("$", Temp, 1)) continue;
|
||||
|
||||
|
||||
if (!nTitleWrote) {
|
||||
_stprintf(szBuffer, _T("%s{\\b\\f0\\fs28\\cf1 %s}"), szBuffer, ANSIToTCHAR(Temp, NULL, 0));
|
||||
} else {
|
||||
_stprintf(szBuffer, _T("%s\\line"), szBuffer);
|
||||
_stprintf(szBuffer, _T("%s\\line"), szBuffer);
|
||||
if (!strncmp("- ", Temp, 2)) {
|
||||
_stprintf(szBuffer, _T("%s{\\b\\f0\\fs16\\cf1 %s}"), szBuffer, ANSIToTCHAR(Temp, NULL, 0));
|
||||
} else {
|
||||
_stprintf(szBuffer, _T("%s{\\f0\\fs16\\cf2 %s}"), szBuffer, ANSIToTCHAR(Temp, NULL, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (strcmp("\n", Temp)) nTitleWrote = 1;
|
||||
}
|
||||
break;
|
||||
|
@ -619,13 +619,13 @@ static int GameInfoInit()
|
|||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
_stprintf(szBuffer, _T("%s}"), szBuffer);
|
||||
SendMessage(GetDlgItem(hGameInfoDlg, IDC_MESSAGE_EDIT_ENG), WM_SETTEXT, (WPARAM)0, (LPARAM)szBuffer);
|
||||
|
||||
|
||||
// Make a white brush
|
||||
hWhiteBGBrush = CreateSolidBrush(RGB(0xFF,0xFF,0xFF));
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -742,7 +742,7 @@ static void MyEndDialog()
|
|||
{
|
||||
SendDlgItemMessage(hGameInfoDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
SendDlgItemMessage(hGameInfoDlg, IDC_SCREENSHOT_V, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
|
||||
|
||||
if (hGiBmp) {
|
||||
DeleteObject((HGDIOBJ)hGiBmp);
|
||||
hGiBmp = NULL;
|
||||
|
@ -751,10 +751,10 @@ static void MyEndDialog()
|
|||
DeleteObject((HGDIOBJ)hPreview);
|
||||
hPreview = NULL;
|
||||
}
|
||||
|
||||
|
||||
hTabControl = NULL;
|
||||
memset(szFullName, 0, 1024 * sizeof(TCHAR));
|
||||
|
||||
|
||||
EndDialog(hGameInfoDlg, 0);
|
||||
}
|
||||
|
||||
|
@ -767,7 +767,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (!kNetGame && bAutoPause) bRunPause = 1;
|
||||
AudSoundStop();
|
||||
}
|
||||
|
||||
|
||||
GameInfoInit();
|
||||
|
||||
WndInMid(hDlg, hParent);
|
||||
|
@ -775,34 +775,34 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (Msg == WM_CLOSE) {
|
||||
MyEndDialog();
|
||||
DeleteObject(hWhiteBGBrush);
|
||||
|
||||
|
||||
EnableWindow(hScrnWnd, TRUE);
|
||||
DestroyWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
FreeLibrary(hRiched);
|
||||
hRiched = NULL;
|
||||
|
||||
|
||||
if (bDrvOkay) {
|
||||
if(!bAltPause && bRunPause) bRunPause = 0;
|
||||
AudSoundPlay();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Msg == WM_COMMAND) {
|
||||
int Id = LOWORD(wParam);
|
||||
int Notify = HIWORD(wParam);
|
||||
|
||||
|
||||
if (Id == IDCANCEL && Notify == BN_CLICKED) {
|
||||
SendMessage(hGameInfoDlg, WM_CLOSE, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDFAVORITESET && Notify == BN_CLICKED) {
|
||||
INT32 nButtonState = SendDlgItemMessage(hGameInfoDlg, IDFAVORITESET, BM_GETSTATE, 0, 0);
|
||||
|
||||
|
@ -816,18 +816,18 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
// even though the selection list [window below it] doesn't have focus. -dink
|
||||
// for proof/symptoms - uncomment the line below and click the 'rescan' button after moving the window to different places on the screen.
|
||||
//bprintf(0, _T("nBurnDrvActive %d nGiDriverSelected %d\n"), nBurnDrvActive, nGiDriverSelected);
|
||||
|
||||
|
||||
switch (BzipOpen(1)) {
|
||||
case 0: {
|
||||
gameAv[nGiDriverSelected] = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 2: {
|
||||
gameAv[nGiDriverSelected] = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 1: {
|
||||
gameAv[nGiDriverSelected] = 0;
|
||||
BzipClose();
|
||||
|
@ -841,7 +841,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (gameAv[nGiDriverSelected] > 0) {
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
if (TabPage != 0) {
|
||||
|
@ -865,13 +865,13 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Msg == WM_NOTIFY) {
|
||||
NMHDR* pNmHdr = (NMHDR*)lParam;
|
||||
|
||||
if (pNmHdr->code == TCN_SELCHANGE) {
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
|
||||
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST1), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST2), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_LIST3), SW_HIDE);
|
||||
|
@ -879,7 +879,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_SCREENSHOT_H), SW_SHOW);
|
||||
ShowWindow(GetDlgItem(hGameInfoDlg, IDC_SCREENSHOT_V), SW_SHOW);
|
||||
UpdateWindow(hGameInfoDlg);
|
||||
|
||||
|
||||
nBurnDrvActive = nGiDriverSelected;
|
||||
|
||||
if (TabPage == 0) DisplayRomInfo();
|
||||
|
@ -903,7 +903,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Msg == WM_CTLCOLORSTATIC) {
|
||||
if ((HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELCOMMENT) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELROMNAME) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELROMINFO) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELSYSTEM) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELNOTES) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_LABELGENRE) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTCOMMENT) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTROMNAME) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTROMINFO) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTSYSTEM) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTNOTES) || (HWND)lParam == GetDlgItem(hGameInfoDlg, IDC_TEXTGENRE)) {
|
||||
return (INT_PTR)hWhiteBGBrush;
|
||||
|
|
|
@ -36,7 +36,7 @@ HBITMAP ImageToBitmap(HWND hwnd, IMAGE* img)
|
|||
HBITMAP PNGLoadBitmap(HWND hWnd, FILE* fp, int nWidth, int nHeight, int nPreset)
|
||||
{
|
||||
IMAGE img = { nWidth, nHeight, 0, 0, NULL, NULL, 0};
|
||||
|
||||
|
||||
if (PNGLoad(&img, fp, nPreset)) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -160,10 +160,10 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (!kNetGame && bAutoPause) {
|
||||
bRunPause = 1;
|
||||
}
|
||||
|
||||
|
||||
WndInMid(hDlg, hScrnWnd);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDC_INPCHEAT_LIST && ((pnm->code == NM_DBLCLK) || (pnm->code == NM_RDBLCLK))) {
|
||||
// Select the next item of the currently selected one.
|
||||
int nSel_Dbl = SendMessage(GetDlgItem(hInpCheatDlg, IDC_INPCX1_VALUE), CB_GETCURSEL, 0, 0);
|
||||
|
|
|
@ -597,24 +597,24 @@ static void SaveHardwarePreset()
|
|||
TCHAR *szDefaultPgmFile = _T("config\\presets\\pgm.ini");
|
||||
TCHAR *szFileName = _T("config\\presets\\preset.ini");
|
||||
TCHAR *szHardwareString = _T("Generic hardware");
|
||||
|
||||
|
||||
int nHardwareFlag = (BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK);
|
||||
|
||||
if (nHardwareFlag == HARDWARE_CAPCOM_CPS1 || nHardwareFlag == HARDWARE_CAPCOM_CPS1_QSOUND || nHardwareFlag == HARDWARE_CAPCOM_CPS1_GENERIC || nHardwareFlag == HARDWARE_CAPCOM_CPSCHANGER || nHardwareFlag == HARDWARE_CAPCOM_CPS2 || nHardwareFlag == HARDWARE_CAPCOM_CPS3) {
|
||||
szFileName = szDefaultCpsFile;
|
||||
szHardwareString = _T("CPS-1/CPS-2/CPS-3 hardware");
|
||||
}
|
||||
|
||||
|
||||
if (nHardwareFlag == HARDWARE_SNK_NEOGEO) {
|
||||
szFileName = szDefaultNeogeoFile;
|
||||
szHardwareString = _T("Neo-Geo hardware");
|
||||
}
|
||||
|
||||
|
||||
if (nHardwareFlag == HARDWARE_IGS_PGM) {
|
||||
szFileName = szDefaultPgmFile;
|
||||
szHardwareString = _T("PGM hardware");
|
||||
}
|
||||
|
||||
|
||||
FILE *fp = _tfopen(szFileName, _T("wt"));
|
||||
if (fp) {
|
||||
_ftprintf(fp, _T(APP_TITLE) _T(" - Hardware Default Preset\n\n"));
|
||||
|
@ -623,15 +623,15 @@ static void SaveHardwarePreset()
|
|||
GameInpWrite(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
// add to dropdown (if not already there)
|
||||
TCHAR szPresetName[MAX_PATH] = _T("");
|
||||
int iCBItem = 0;
|
||||
|
||||
|
||||
memcpy(szPresetName, szFileName + 15, (_tcslen(szFileName) - 19) * sizeof(TCHAR));
|
||||
iCBItem = SendMessage(hInpdPci, CB_FINDSTRING, -1, (LPARAM)szPresetName);
|
||||
if (iCBItem == -1) SendMessage(hInpdPci, CB_ADDSTRING, 0, (LPARAM)szPresetName);
|
||||
|
||||
|
||||
// confirm to user
|
||||
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_PRESET_SAVED), szFileName);
|
||||
FBAPopupDisplay(PUF_TYPE_INFO);
|
||||
|
@ -709,7 +709,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (!kNetGame && bAutoPause) {
|
||||
bRunPause = 1;
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -743,7 +743,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDC_INPD_SAVE_AS_PRESET && Notify == BN_CLICKED) {
|
||||
SaveHardwarePreset();
|
||||
return 0;
|
||||
|
@ -915,7 +915,7 @@ int InpdCreate()
|
|||
|
||||
WndInMid(hInpdDlg, hScrnWnd);
|
||||
ShowWindow(hInpdDlg, SW_NORMAL);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,10 +237,10 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (!kNetGame && bAutoPause) {
|
||||
bRunPause = 1;
|
||||
}
|
||||
|
||||
|
||||
WndInMid(hDlg, hScrnWnd);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ int GetIpsNumPatches()
|
|||
|
||||
_stprintf(szFilePath, _T("%s%s\\"), szAppIpsPath, BurnDrvGetText(DRV_NAME));
|
||||
_tcscat(szFilePath, _T("*.dat"));
|
||||
|
||||
|
||||
hSearch = FindFirstFile(szFilePath, &wfd);
|
||||
|
||||
if (hSearch != INVALID_HANDLE_VALUE) {
|
||||
|
@ -87,7 +87,7 @@ static TCHAR* GetPatchDescByLangcode(FILE* fp, int nLang)
|
|||
char langtag[10];
|
||||
|
||||
sprintf(langtag, "[%s]", TCHARToANSI(szLanguageCodes[nLang], NULL, 0));
|
||||
|
||||
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
|
||||
while (!feof(fp))
|
||||
|
@ -126,7 +126,7 @@ static TCHAR* GetPatchDescByLangcode(FILE* fp, int nLang)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (desc)
|
||||
{
|
||||
char* p1;
|
||||
|
@ -173,31 +173,31 @@ static void FillListBox()
|
|||
TCHAR *PatchDesc = NULL;
|
||||
TCHAR PatchName[256];
|
||||
int nHandlePos = 0;
|
||||
|
||||
|
||||
TV_INSERTSTRUCT TvItem;
|
||||
|
||||
|
||||
memset(&TvItem, 0, sizeof(TvItem));
|
||||
TvItem.item.mask = TVIF_TEXT | TVIF_PARAM;
|
||||
TvItem.hInsertAfter = TVI_LAST;
|
||||
|
||||
_stprintf(szFilePath, _T("%s%s\\"), szAppIpsPath, szDriverName);
|
||||
_stprintf(szFilePathSearch, _T("%s*.dat"), szFilePath);
|
||||
|
||||
|
||||
hSearch = FindFirstFile(szFilePathSearch, &wfd);
|
||||
|
||||
if (hSearch != INVALID_HANDLE_VALUE) {
|
||||
int Done = 0;
|
||||
|
||||
|
||||
while (!Done ) {
|
||||
memset(szFileName, '\0', MAX_PATH * sizeof(TCHAR));
|
||||
_stprintf(szFileName, _T("%s%s"), szFilePath, wfd.cFileName);
|
||||
|
||||
|
||||
FILE *fp = _tfopen(szFileName, _T("r"));
|
||||
if (fp) {
|
||||
bool AllocDesc = false;
|
||||
PatchDesc = NULL;
|
||||
memset(PatchName, '\0', 256 * sizeof(TCHAR));
|
||||
|
||||
|
||||
PatchDesc = GetPatchDescByLangcode(fp, nIpsSelectedLanguage);
|
||||
// If not available - try English first
|
||||
if (PatchDesc == NULL) PatchDesc = GetPatchDescByLangcode(fp, 0);
|
||||
|
@ -215,7 +215,7 @@ static void FillListBox()
|
|||
|
||||
for (unsigned int i = 0; i < _tcslen(PatchDesc); i++) {
|
||||
if (PatchDesc[i] == '\r' || PatchDesc[i] == '\n') break;
|
||||
PatchName[i] = PatchDesc[i];
|
||||
PatchName[i] = PatchDesc[i];
|
||||
}
|
||||
|
||||
if (AllocDesc) {
|
||||
|
@ -228,7 +228,7 @@ static void FillListBox()
|
|||
int nNumNodes = 0;
|
||||
TCHAR szCategory[256];
|
||||
unsigned int nPatchNameLength = _tcslen(PatchName);
|
||||
|
||||
|
||||
Tokens = _tcstok(PatchName, _T("/"));
|
||||
while (Tokens != NULL) {
|
||||
if (nNumTokens == 0) {
|
||||
|
@ -247,21 +247,21 @@ static void FillListBox()
|
|||
|
||||
if (!_tcsicmp(Tvi.pszText, Tokens)) bAddItem = 0;
|
||||
}
|
||||
|
||||
|
||||
if (bAddItem) {
|
||||
TvItem.hParent = TVI_ROOT;
|
||||
TvItem.item.pszText = Tokens;
|
||||
hItemHandles[nHandlePos] = (HTREEITEM)SendMessage(hIpsList, TVM_INSERTITEM, 0, (LPARAM)&TvItem);
|
||||
nHandlePos++;
|
||||
}
|
||||
|
||||
|
||||
if (_tcslen(Tokens) == nPatchNameLength) {
|
||||
hPatchHandlesIndex[nPatchIndex] = hItemHandles[nHandlePos - 1];
|
||||
_tcscpy(szPatchFileNames[nPatchIndex], szFileName);
|
||||
|
||||
|
||||
nPatchIndex++;
|
||||
}
|
||||
|
||||
|
||||
_tcscpy(szCategory, Tokens);
|
||||
} else {
|
||||
HTREEITEM hNode = TVI_ROOT;
|
||||
|
@ -279,22 +279,22 @@ static void FillListBox()
|
|||
|
||||
if (!_tcsicmp(Tvi.pszText, szCategory)) hNode = Tvi.hItem;
|
||||
}
|
||||
|
||||
|
||||
TvItem.hParent = hNode;
|
||||
TvItem.item.pszText = Tokens;
|
||||
hItemHandles[nHandlePos] = (HTREEITEM)SendMessage(hIpsList, TVM_INSERTITEM, 0, (LPARAM)&TvItem);
|
||||
|
||||
|
||||
hPatchHandlesIndex[nPatchIndex] = hItemHandles[nHandlePos];
|
||||
_tcscpy(szPatchFileNames[nPatchIndex], szFileName);
|
||||
|
||||
|
||||
nHandlePos++;
|
||||
nPatchIndex++;
|
||||
}
|
||||
|
||||
|
||||
Tokens = _tcstok(NULL, _T("/"));
|
||||
nNumTokens++;
|
||||
}
|
||||
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
@ -303,9 +303,9 @@ static void FillListBox()
|
|||
|
||||
FindClose(hSearch);
|
||||
}
|
||||
|
||||
|
||||
nNumPatches = nPatchIndex;
|
||||
|
||||
|
||||
// Expand all branches
|
||||
int nNumNodes = SendMessage(hIpsList, TVM_GETCOUNT, (WPARAM)0, (LPARAM)0);;
|
||||
for (int i = 0; i < nNumNodes; i++) {
|
||||
|
@ -316,7 +316,7 @@ static void FillListBox()
|
|||
int GetIpsNumActivePatches()
|
||||
{
|
||||
int nActivePatches = 0;
|
||||
|
||||
|
||||
for (int i = 0; i < MAX_ACTIVE_PATCHES; i++) {
|
||||
if (_tcsicmp(szIpsActivePatches[i], _T(""))) nActivePatches++;
|
||||
}
|
||||
|
@ -335,24 +335,24 @@ void LoadIpsActivePatches()
|
|||
FILE* fp = _tfopen(GameIpsConfigName(), _T("rt"));
|
||||
TCHAR szLine[MAX_PATH];
|
||||
int nActivePatches = 0;
|
||||
|
||||
|
||||
if (fp) {
|
||||
while (_fgetts(szLine, sizeof(szLine), fp)) {
|
||||
int nLen = _tcslen(szLine);
|
||||
|
||||
|
||||
// Get rid of the linefeed at the end
|
||||
if (szLine[nLen - 1] == 10) {
|
||||
szLine[nLen - 1] = 0;
|
||||
nLen--;
|
||||
}
|
||||
|
||||
|
||||
if (!_tcsnicmp(szLine, _T("//"), 2)) continue;
|
||||
if (!_tcsicmp(szLine, _T(""))) continue;
|
||||
|
||||
|
||||
_stprintf(szIpsActivePatches[nActivePatches], _T("%s%s\\%s"), szAppIpsPath, szDriverName, szLine);
|
||||
nActivePatches++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
@ -360,9 +360,9 @@ void LoadIpsActivePatches()
|
|||
static void CheckActivePatches()
|
||||
{
|
||||
LoadIpsActivePatches();
|
||||
|
||||
|
||||
int nActivePatches = GetIpsNumActivePatches();
|
||||
|
||||
|
||||
for (int i = 0; i < nActivePatches; i++) {
|
||||
for (int j = 0; j < nNumPatches; j++) {
|
||||
if (!_tcsicmp(szIpsActivePatches[i], szPatchFileNames[j])) {
|
||||
|
@ -380,7 +380,7 @@ static int IpsManagerInit()
|
|||
TCHAR* pszName = BurnDrvGetText(DRV_FULLNAME);
|
||||
|
||||
pszPosition += _sntprintf(szText, 1024, pszName);
|
||||
|
||||
|
||||
pszName = BurnDrvGetText(DRV_FULLNAME);
|
||||
while ((pszName = BurnDrvGetText(DRV_NEXTNAME | DRV_FULLNAME)) != NULL) {
|
||||
if (pszPosition + _tcslen(pszName) - 1024 > szText) {
|
||||
|
@ -388,14 +388,14 @@ static int IpsManagerInit()
|
|||
}
|
||||
pszPosition += _stprintf(pszPosition, _T(SEPERATOR_2) _T("%s"), pszName);
|
||||
}
|
||||
|
||||
|
||||
_tcscpy(szFullName, szText);
|
||||
|
||||
|
||||
_stprintf(szText, _T("%s") _T(SEPERATOR_1) _T("%s"), FBALoadStringEx(hAppInst, IDS_IPSMANAGER_TITLE, true), szFullName);
|
||||
|
||||
|
||||
// Set the window caption
|
||||
SetWindowText(hIpsDlg, szText);
|
||||
|
||||
|
||||
// Fill the combo box
|
||||
_stprintf(szLanguages[0], FBALoadStringEx(hAppInst, IDS_LANG_ENGLISH_US, true));
|
||||
_stprintf(szLanguages[1], FBALoadStringEx(hAppInst, IDS_LANG_SIMP_CHINESE, true));
|
||||
|
@ -409,7 +409,7 @@ static int IpsManagerInit()
|
|||
_stprintf(szLanguages[9], FBALoadStringEx(hAppInst, IDS_LANG_PORTUGUESE, true));
|
||||
_stprintf(szLanguages[10], FBALoadStringEx(hAppInst, IDS_LANG_POLISH, true));
|
||||
_stprintf(szLanguages[11], FBALoadStringEx(hAppInst, IDS_LANG_HUNGARIAN, true));
|
||||
|
||||
|
||||
_stprintf(szLanguageCodes[0], _T("en_US"));
|
||||
_stprintf(szLanguageCodes[1], _T("zh_CN"));
|
||||
_stprintf(szLanguageCodes[2], _T("zh_TW"));
|
||||
|
@ -426,17 +426,17 @@ static int IpsManagerInit()
|
|||
for (int i = 0; i < NUM_LANGUAGES; i++) {
|
||||
SendDlgItemMessage(hIpsDlg, IDC_CHOOSE_LIST, CB_ADDSTRING, 0, (LPARAM)&szLanguages[i]);
|
||||
}
|
||||
|
||||
|
||||
SendDlgItemMessage(hIpsDlg, IDC_CHOOSE_LIST, CB_SETCURSEL, (WPARAM)nIpsSelectedLanguage, (LPARAM)0);
|
||||
|
||||
|
||||
hIpsList = GetDlgItem(hIpsDlg, IDC_TREE1);
|
||||
|
||||
|
||||
_tcscpy(szDriverName, BurnDrvGetText(DRV_NAME));
|
||||
|
||||
|
||||
FillListBox();
|
||||
|
||||
|
||||
CheckActivePatches();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -444,18 +444,18 @@ static void RefreshPatch()
|
|||
{
|
||||
SendMessage(GetDlgItem(hIpsDlg, IDC_TEXTCOMMENT), WM_SETTEXT, (WPARAM)0, (LPARAM)NULL);
|
||||
SendDlgItemMessage(hIpsDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hPreview);
|
||||
|
||||
|
||||
HTREEITEM hSelectHandle = (HTREEITEM)SendMessage(hIpsList, TVM_GETNEXTITEM, TVGN_CARET, ~0U);
|
||||
|
||||
|
||||
if (hBmp) {
|
||||
DeleteObject((HGDIOBJ)hBmp);
|
||||
hBmp = NULL;
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < nNumPatches; i++) {
|
||||
if (hSelectHandle == hPatchHandlesIndex[i]) {
|
||||
TCHAR *PatchDesc = NULL;
|
||||
|
||||
|
||||
FILE *fp = _tfopen(szPatchFileNames[i], _T("r"));
|
||||
if (fp) {
|
||||
PatchDesc = GetPatchDescByLangcode(fp, nIpsSelectedLanguage);
|
||||
|
@ -463,28 +463,28 @@ static void RefreshPatch()
|
|||
if (PatchDesc == NULL) PatchDesc = GetPatchDescByLangcode(fp, 0);
|
||||
// Simplified Chinese is the reference language (should always be available!!)
|
||||
if (PatchDesc == NULL) PatchDesc = GetPatchDescByLangcode(fp, 1);
|
||||
|
||||
|
||||
SendMessage(GetDlgItem(hIpsDlg, IDC_TEXTCOMMENT), WM_SETTEXT, (WPARAM)0, (LPARAM)PatchDesc);
|
||||
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
fp = NULL;
|
||||
|
||||
|
||||
TCHAR szImageFileName[MAX_PATH];
|
||||
szImageFileName[0] = _T('\0');
|
||||
|
||||
|
||||
_tcscpy(szImageFileName, szPatchFileNames[i]);
|
||||
szImageFileName[_tcslen(szImageFileName) - 3] = _T('p');
|
||||
szImageFileName[_tcslen(szImageFileName) - 2] = _T('n');
|
||||
szImageFileName[_tcslen(szImageFileName) - 1] = _T('g');
|
||||
|
||||
|
||||
fp = _tfopen(szImageFileName, _T("rb"));
|
||||
HBITMAP hNewImage = NULL;
|
||||
if (fp) {
|
||||
hNewImage = PNGLoadBitmap(hIpsDlg, fp, 304, 228, 3);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
if (hNewImage) {
|
||||
DeleteObject((HGDIOBJ)hBmp);
|
||||
hBmp = hNewImage;
|
||||
|
@ -499,22 +499,22 @@ static void RefreshPatch()
|
|||
static void SavePatches()
|
||||
{
|
||||
int nActivePatches = 0;
|
||||
|
||||
|
||||
for (int i = 0; i < MAX_ACTIVE_PATCHES; i++) {
|
||||
_stprintf(szIpsActivePatches[i], _T(""));
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < nNumPatches; i++) {
|
||||
int nChecked = _TreeView_GetCheckState(hIpsList, hPatchHandlesIndex[i]);
|
||||
|
||||
|
||||
if (nChecked) {
|
||||
_tcscpy(szIpsActivePatches[nActivePatches], szPatchFileNames[i]);
|
||||
nActivePatches++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FILE* fp = _tfopen(GameIpsConfigName(), _T("wt"));
|
||||
|
||||
|
||||
if (fp) {
|
||||
_ftprintf(fp, _T("// ") _T(APP_TITLE) _T(" v%s --- IPS Config File for %s (%s)\n\n"), szAppBurnVer, szDriverName, szFullName);
|
||||
for (int i = 0; i < nActivePatches; i++) {
|
||||
|
@ -525,8 +525,8 @@ static void SavePatches()
|
|||
szFileName[0] = _T('\0');
|
||||
_tcscpy(szFileName, Tokens);
|
||||
Tokens = _tcstok(NULL, _T("\\"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_ftprintf(fp, _T("%s\n"), szFileName);
|
||||
}
|
||||
fclose(fp);
|
||||
|
@ -536,36 +536,36 @@ static void SavePatches()
|
|||
static void IpsManagerExit()
|
||||
{
|
||||
SendDlgItemMessage(hIpsDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)NULL);
|
||||
|
||||
|
||||
for (int i = 0; i < NUM_LANGUAGES; i++) {
|
||||
szLanguages[i][0] = _T('\0');
|
||||
szLanguageCodes[i][0] = _T('\0');
|
||||
}
|
||||
|
||||
|
||||
memset(hItemHandles, 0, MAX_NODES * sizeof(HTREEITEM));
|
||||
memset(hPatchHandlesIndex, 0, MAX_NODES * sizeof(HTREEITEM));
|
||||
|
||||
nPatchIndex = 0;
|
||||
nNumPatches = 0;
|
||||
|
||||
|
||||
for (int i = 0; i < MAX_NODES; i++) {
|
||||
szPatchFileNames[i][0] = _T('\0');
|
||||
}
|
||||
|
||||
|
||||
if (hBmp) {
|
||||
DeleteObject((HGDIOBJ)hBmp);
|
||||
hBmp = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (hPreview) {
|
||||
DeleteObject((HGDIOBJ)hPreview);
|
||||
hPreview = NULL;
|
||||
}
|
||||
|
||||
|
||||
DeleteObject(hWhiteBGBrush);
|
||||
|
||||
|
||||
hParent = NULL;
|
||||
|
||||
|
||||
EndDialog(hIpsDlg, 0);
|
||||
}
|
||||
|
||||
|
@ -580,39 +580,39 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
switch (Msg) {
|
||||
case WM_INITDIALOG: {
|
||||
hIpsDlg = hDlg;
|
||||
|
||||
|
||||
hWhiteBGBrush = CreateSolidBrush(RGB(0xFF,0xFF,0xFF));
|
||||
hPreview = PNGLoadBitmap(hIpsDlg, NULL, 304, 228, 2);
|
||||
SendDlgItemMessage(hIpsDlg, IDC_SCREENSHOT_H, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hPreview);
|
||||
|
||||
|
||||
LONG_PTR Style;
|
||||
Style = GetWindowLongPtr (GetDlgItem(hIpsDlg, IDC_TREE1), GWL_STYLE);
|
||||
Style |= TVS_CHECKBOXES;
|
||||
SetWindowLongPtr (GetDlgItem(hIpsDlg, IDC_TREE1), GWL_STYLE, Style);
|
||||
|
||||
|
||||
IpsManagerInit();
|
||||
|
||||
WndInMid(hDlg, hScrnWnd);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_COMMAND: {
|
||||
int wID = LOWORD(wParam);
|
||||
int Notify = HIWORD(wParam);
|
||||
|
||||
|
||||
if (Notify == BN_CLICKED) {
|
||||
switch (wID) {
|
||||
case IDOK: {
|
||||
IpsOkay();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case IDCANCEL: {
|
||||
SendMessage(hDlg, WM_CLOSE, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
case IDC_IPSMAN_DESELECTALL: {
|
||||
for (int i = 0; i < nNumPatches; i++) {
|
||||
for (int j = 0; j < nNumPatches; j++) {
|
||||
|
@ -623,7 +623,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (wID == IDC_CHOOSE_LIST && Notify == CBN_SELCHANGE) {
|
||||
nIpsSelectedLanguage = SendMessage(GetDlgItem(hIpsDlg, IDC_CHOOSE_LIST), CB_GETCURSEL, 0, 0);
|
||||
TreeView_DeleteAllItems(hIpsList);
|
||||
|
@ -631,26 +631,26 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
RefreshPatch();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_NOTIFY: {
|
||||
NMHDR* pNmHdr = (NMHDR*)lParam;
|
||||
|
||||
|
||||
if (LOWORD(wParam) == IDC_TREE1 && pNmHdr->code == TVN_SELCHANGED) {
|
||||
RefreshPatch();
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (LOWORD(wParam) == IDC_TREE1 && pNmHdr->code == NM_DBLCLK) {
|
||||
// disable double-click node-expand
|
||||
SetWindowLongPtr(hIpsDlg, DWLP_MSGRESULT, 1);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (LOWORD(wParam) == IDC_TREE1 && pNmHdr->code == NM_CLICK) {
|
||||
POINT cursorPos;
|
||||
GetCursorPos(&cursorPos);
|
||||
|
@ -663,21 +663,21 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (thi.flags == TVHT_ONITEMSTATEICON) {
|
||||
TreeView_SelectItem(hIpsList, thi.hItem);
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetWindowLongPtr(hIpsDlg, DWLP_MSGRESULT, CDRF_DODEFAULT);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
case WM_CTLCOLORSTATIC: {
|
||||
if ((HWND)lParam == GetDlgItem(hIpsDlg, IDC_TEXTCOMMENT)) {
|
||||
return (INT_PTR)hWhiteBGBrush;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_CLOSE: {
|
||||
IpsManagerExit();
|
||||
break;
|
||||
|
@ -690,7 +690,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
int IpsManagerCreate(HWND hParentWND)
|
||||
{
|
||||
hParent = hParentWND;
|
||||
|
||||
|
||||
FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_IPS_MANAGER), hParent, (DLGPROC)DefInpProc);
|
||||
return 1;
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ int IpsManagerCreate(HWND hParentWND)
|
|||
#define BYTE2_TO_UINT(bp) \
|
||||
(((unsigned int)(bp)[0] << 8) & 0xFF00) | \
|
||||
((unsigned int) (bp)[1] & 0x00FF)
|
||||
|
||||
|
||||
bool bDoIpsPatch = FALSE;
|
||||
|
||||
static void PatchFile(const char* ips_path, UINT8* base, bool readonly)
|
||||
|
|
|
@ -1650,7 +1650,7 @@ static void MakeOfn()
|
|||
{
|
||||
_stprintf(szFilter, _T("%s"), FBALoadStringEx(hAppInst, IDS_LOCAL_FILTER, true));
|
||||
memcpy(szFilter + _tcslen(szFilter), _T(" (*.flt)\0*.flt\0\0"), 16 * sizeof(TCHAR));
|
||||
|
||||
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hScrnWnd;
|
||||
|
|
|
@ -12,34 +12,34 @@ static int langCodes[MAX_LANGUAGES];
|
|||
static void LocaliseDownloadExit()
|
||||
{
|
||||
hParent = NULL;
|
||||
|
||||
|
||||
memset(langCodes, 0, MAX_LANGUAGES * sizeof(int));
|
||||
|
||||
|
||||
EndDialog(hLocalDownDlg, 0);
|
||||
}
|
||||
|
||||
static INT32 LocaliseDownloadInit()
|
||||
{
|
||||
HINTERNET connect = InternetOpen(_T("MyBrowser"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
|
||||
|
||||
|
||||
if (!connect) {
|
||||
MessageBox(hLocalDownDlg, FBALoadStringEx(hAppInst, IDS_ERR_LOCAL_FAIL_CONNECT, true), FBALoadStringEx(hAppInst, IDS_ERR_ERROR, true), MB_OK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
HINTERNET OpenAddress = InternetOpenUrl(connect, _T("https://www.fbalpha.com/localisationinfo/"), NULL, 0, INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
if (!OpenAddress) {
|
||||
MessageBox(hLocalDownDlg, FBALoadStringEx(hAppInst, IDS_ERR_LOCAL_FAIL_OPEN_URL, true), FBALoadStringEx(hAppInst, IDS_ERR_ERROR, true), MB_OK);
|
||||
InternetCloseHandle(connect);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
char DataReceived[4096];
|
||||
DWORD NumberOfBytesRead = 0;
|
||||
InternetReadFile(OpenAddress, DataReceived, 4096, &NumberOfBytesRead);
|
||||
|
||||
|
||||
DataReceived[NumberOfBytesRead] = '\0';
|
||||
|
||||
|
||||
char *Tokens;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
@ -51,16 +51,16 @@ static INT32 LocaliseDownloadInit()
|
|||
langCodes[j] = atoi(Tokens);
|
||||
j++;
|
||||
}
|
||||
|
||||
|
||||
i++;
|
||||
Tokens = strtok(NULL, ":^");
|
||||
}
|
||||
|
||||
|
||||
SendDlgItemMessage(hLocalDownDlg, IDC_CHOOSE_LIST, CB_SETCURSEL, (WPARAM)0, (LPARAM)0);
|
||||
|
||||
|
||||
InternetCloseHandle(OpenAddress);
|
||||
InternetCloseHandle(connect);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -68,15 +68,15 @@ static int LocaliseDownloadOkay()
|
|||
{
|
||||
TCHAR szTitle[256];
|
||||
TCHAR szFilter[256];
|
||||
|
||||
|
||||
int nIndex = SendMessage(GetDlgItem(hLocalDownDlg, IDC_CHOOSE_LIST), CB_GETCURSEL, 0, 0);
|
||||
SendMessage(GetDlgItem(hLocalDownDlg, IDC_CHOOSE_LIST), CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)szChoice);
|
||||
|
||||
|
||||
_sntprintf(szTitle, 256, FBALoadStringEx(hAppInst, IDS_LOCAL_GL_SELECT, true));
|
||||
|
||||
_stprintf(szFilter, FBALoadStringEx(hAppInst, IDS_LOCAL_GL_FILTER, true));
|
||||
memcpy(szFilter + _tcslen(szFilter), _T(" (*.flt)\0*.flt\0\0"), 16 * sizeof(TCHAR));
|
||||
|
||||
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hScrnWnd;
|
||||
|
@ -90,42 +90,42 @@ static int LocaliseDownloadOkay()
|
|||
ofn.Flags |= OFN_OVERWRITEPROMPT;
|
||||
|
||||
if (GetSaveFileName(&ofn) == 0) return 1;
|
||||
|
||||
|
||||
FILE *fFlt = NULL;
|
||||
|
||||
|
||||
if ((fFlt = _tfopen(szChoice, _T("wb"))) == 0) return 1;
|
||||
|
||||
|
||||
HINTERNET connect = InternetOpen(_T("MyBrowser"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
|
||||
|
||||
|
||||
if (!connect) {
|
||||
MessageBox(hLocalDownDlg, FBALoadStringEx(hAppInst, IDS_ERR_LOCAL_FAIL_CONNECT, true), FBALoadStringEx(hAppInst, IDS_ERR_ERROR, true), MB_OK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
TCHAR url[256];
|
||||
_sntprintf(url, 256, _T("https://www.fbalpha.com/localisation/downloadtemplates/%i/"), langCodes[nIndex]);
|
||||
|
||||
|
||||
HINTERNET OpenAddress = InternetOpenUrl(connect, url, NULL, 0, INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_KEEP_CONNECTION, 0);
|
||||
if (!OpenAddress) {
|
||||
MessageBox(hLocalDownDlg, FBALoadStringEx(hAppInst, IDS_ERR_LOCAL_FAIL_OPEN_URL, true), FBALoadStringEx(hAppInst, IDS_ERR_ERROR, true), MB_OK);
|
||||
InternetCloseHandle(connect);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
char DataReceived[4096];
|
||||
DWORD NumberOfBytesRead = 0;
|
||||
while (InternetReadFile(OpenAddress, DataReceived, 4096, &NumberOfBytesRead) && NumberOfBytesRead) {
|
||||
fwrite(DataReceived, sizeof(char), NumberOfBytesRead, fFlt);
|
||||
}
|
||||
|
||||
|
||||
InternetCloseHandle(OpenAddress);
|
||||
InternetCloseHandle(connect);
|
||||
|
||||
fclose(fFlt);
|
||||
|
||||
|
||||
FBALocaliseInit(szChoice);
|
||||
POST_INITIALISE_MESSAGE;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -134,18 +134,18 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM /*
|
|||
switch (Msg) {
|
||||
case WM_INITDIALOG: {
|
||||
hLocalDownDlg = hDlg;
|
||||
|
||||
|
||||
if (LocaliseDownloadInit() == 1) SendMessage(hDlg, WM_CLOSE, 0, 0);
|
||||
|
||||
WndInMid(hDlg, hScrnWnd);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_COMMAND: {
|
||||
int wID = LOWORD(wParam);
|
||||
int Notify = HIWORD(wParam);
|
||||
|
||||
|
||||
if (Notify == BN_CLICKED) {
|
||||
switch (wID) {
|
||||
case IDOK: {
|
||||
|
@ -153,17 +153,17 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM /*
|
|||
SendMessage(hDlg, WM_CLOSE, 0, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case IDCANCEL: {
|
||||
SendMessage(hDlg, WM_CLOSE, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_CLOSE: {
|
||||
LocaliseDownloadExit();
|
||||
break;
|
||||
|
@ -176,7 +176,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM /*
|
|||
int LocaliseDownloadCreate(HWND hParentWND)
|
||||
{
|
||||
hParent = hParentWND;
|
||||
|
||||
|
||||
FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_DOWNLOAD_LOCAL), hParent, (DLGPROC)DefInpProc);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ static TCHAR *szLongNamesArray[MAX_LST_GAMES];
|
|||
void BurnerDoGameListLocalisation()
|
||||
{
|
||||
if (!nGamelistLocalisationActive) return;
|
||||
|
||||
|
||||
FILE* fp = _tfopen(szGamelistLocalisationTemplate, _T("rt"));
|
||||
if (fp) {
|
||||
TCHAR *szShortNamesArray[MAX_LST_GAMES];
|
||||
|
@ -20,7 +20,7 @@ void BurnerDoGameListLocalisation()
|
|||
int nTokenPos = 0;
|
||||
int nArrayPos = 0;
|
||||
int nNumGames = 0;
|
||||
|
||||
|
||||
// Allocate arrays to read the file into
|
||||
for (int i = 0; i < MAX_LST_GAMES; i++) {
|
||||
szLongNamesArray[i] = (TCHAR*)malloc(MAX_LST_LINE_LEN * sizeof(TCHAR));
|
||||
|
@ -28,14 +28,14 @@ void BurnerDoGameListLocalisation()
|
|||
memset(szLongNamesArray[i], _T('\0'), MAX_LST_LINE_LEN * sizeof(TCHAR));
|
||||
memset(szShortNamesArray[i], _T('\0'), 33 * sizeof(TCHAR));
|
||||
}
|
||||
|
||||
|
||||
char szTemp[MAX_LST_LINE_LEN];
|
||||
|
||||
|
||||
while (fgets(szTemp, sizeof(szTemp), fp)) {
|
||||
if (szTemp[0] == '/' && szTemp[1] == '/') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!strncmp(szTemp, "codepage=", 9)) {
|
||||
if ((strlen(szTemp) - 10) == 4) {
|
||||
nCodePage = (szTemp[9] - '0') * 1000;
|
||||
|
@ -50,18 +50,18 @@ void BurnerDoGameListLocalisation()
|
|||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Get rid of the linefeed at the end
|
||||
int nLen = strlen(szTemp);
|
||||
if (szTemp[nLen - 1] == 10) {
|
||||
szTemp[nLen - 1] = 0;
|
||||
nLen--;
|
||||
}
|
||||
|
||||
MultiByteToWideChar(nCodePage, 0, szTemp, -1, szLine, sizeof(szLine) / sizeof(TCHAR));
|
||||
|
||||
|
||||
MultiByteToWideChar(nCodePage, 0, szTemp, -1, szLine, sizeof(szLine) / sizeof(TCHAR));
|
||||
|
||||
TCHAR *Tokens;
|
||||
|
||||
|
||||
// Read the file into arrays
|
||||
Tokens = _tcstok(szLine, _T("\t"));
|
||||
while (Tokens != NULL) {
|
||||
|
@ -69,12 +69,12 @@ void BurnerDoGameListLocalisation()
|
|||
wcscpy(szShortNamesArray[nArrayPos], Tokens);
|
||||
// szShortNamesArray[nArrayPos][_tcslen(Tokens)] = _T('\0');
|
||||
}
|
||||
|
||||
|
||||
if (nTokenPos == 1) {
|
||||
wcscpy(szLongNamesArray[nArrayPos], Tokens);
|
||||
// szLongNamesArray[nArrayPos][_tcslen(Tokens)] = _T('\0');
|
||||
}
|
||||
|
||||
|
||||
Tokens = _tcstok(NULL, _T("\t"));
|
||||
nTokenPos++;
|
||||
}
|
||||
|
@ -83,11 +83,11 @@ void BurnerDoGameListLocalisation()
|
|||
nArrayPos++;
|
||||
}
|
||||
nNumGames = nArrayPos;
|
||||
|
||||
|
||||
for (int i = 0; i < nNumGames; i++) {
|
||||
BurnLocalisationSetName(TCHARToANSI(szShortNamesArray[i], NULL, 0), szLongNamesArray[i]);
|
||||
}
|
||||
|
||||
|
||||
// tidy up
|
||||
for (int i = 0; i < MAX_LST_GAMES; i++) {
|
||||
if (szShortNamesArray[i]) {
|
||||
|
@ -103,20 +103,20 @@ void BurnerDoGameListLocalisation()
|
|||
static void BurnerGameListCreateTemplate()
|
||||
{
|
||||
unsigned int nOldDrvSelect = nBurnDrvActive;
|
||||
|
||||
|
||||
FILE* fp = _tfopen(szGamelistLocalisationTemplate, _T("wt"));
|
||||
if (fp) {
|
||||
_ftprintf(fp, _T("// game list translation template for FB Alpha version 0x%06X\n\n"), nBurnVer);
|
||||
_ftprintf(fp, _T("// codepage=1252\n\n"));
|
||||
|
||||
|
||||
for (unsigned int i = 0; i < nBurnDrvCount; i++) {
|
||||
nBurnDrvActive = i;
|
||||
_ftprintf(fp, _T("%s\t%s\n"), BurnDrvGetText(DRV_NAME), BurnDrvGetText(DRV_ASCIIONLY | DRV_FULLNAME));
|
||||
}
|
||||
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
||||
nBurnDrvActive = nOldDrvSelect;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ void BurnerExitGameListLocalisation()
|
|||
szLongNamesArray[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nCodePage = CP_ACP;
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ static void MakeOfn()
|
|||
{
|
||||
_stprintf(szFilter, _T("%s"), FBALoadStringEx(hAppInst, IDS_LOCAL_GL_FILTER, true));
|
||||
memcpy(szFilter + _tcslen(szFilter), _T(" (*.glt)\0*.glt\0\0"), 16 * sizeof(TCHAR));
|
||||
|
||||
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hScrnWnd;
|
||||
|
@ -172,7 +172,7 @@ int FBALocaliseGamelistLoadTemplate()
|
|||
if (nRet == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
nGamelistLocalisationActive = true;
|
||||
BurnerDoGameListLocalisation();
|
||||
|
||||
|
@ -196,8 +196,8 @@ int FBALocaliseGamelistCreateTemplate()
|
|||
if (nRet == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
BurnerGameListCreateTemplate();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ int OpenDebugLog()
|
|||
|
||||
_ftprintf(DebugLog, _T("<div style=\"font-size:16px;font-weight:bold;\">"));
|
||||
_ftprintf(DebugLog, _T("Debug log created by ") _T(APP_TITLE) _T(" v%.20s on %s"), szAppBurnVer, _tasctime(tmTime));
|
||||
|
||||
|
||||
_ftprintf(DebugLog, _T("</div><div style=\"margin-top:12px;\"><input type=\"checkbox\" id=\"chb_all\" onclick=\"$('input:checkbox').not(this).prop('checked', this.checked);\" checked> <label for=\"chb_all\">(Un)check All</label>"));
|
||||
_ftprintf(DebugLog, _T("</div><div style=\"margin-top:12px;\"><input type=\"checkbox\" id=\"chb_ui\" onclick=\"if(this.checked==true){$(\'.ui\').show();}else{$(\'.ui\').hide();}\" checked> <label for=\"chb_ui\" class=\"ui_chb\">UI</label>"));
|
||||
_ftprintf(DebugLog, _T("</div><div><input type=\"checkbox\" id=\"chb_normal\" onclick=\"if(this.checked==true){$(\'.normal\').show();}else{$(\'.normal\').hide();}\" checked> <label for=\"chb_normal\" class=\"normal_chb\">Normal</label>"));
|
||||
|
@ -508,13 +508,13 @@ void MonitorAutoCheck()
|
|||
|
||||
x = GetSystemMetrics(SM_CXSCREEN);
|
||||
y = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
|
||||
// default full-screen resolution to this size
|
||||
nVidHorWidth = x;
|
||||
nVidHorHeight = y;
|
||||
nVidVerWidth = x;
|
||||
nVidVerHeight = y;
|
||||
|
||||
|
||||
// also add this to the presets
|
||||
VidPreset[3].nWidth = x;
|
||||
VidPreset[3].nHeight = y;
|
||||
|
@ -525,34 +525,34 @@ void MonitorAutoCheck()
|
|||
_stprintf(szResXY, _T("%dx%d"), x, y);
|
||||
|
||||
// Normal CRT (4:3) ( Verified at Wikipedia.Org )
|
||||
if( !_tcscmp(szResXY, _T("320x240")) ||
|
||||
if( !_tcscmp(szResXY, _T("320x240")) ||
|
||||
!_tcscmp(szResXY, _T("512x384")) ||
|
||||
!_tcscmp(szResXY, _T("640x480")) ||
|
||||
!_tcscmp(szResXY, _T("640x480")) ||
|
||||
!_tcscmp(szResXY, _T("800x600")) ||
|
||||
!_tcscmp(szResXY, _T("832x624")) ||
|
||||
!_tcscmp(szResXY, _T("1024x768")) ||
|
||||
!_tcscmp(szResXY, _T("1120x832")) ||
|
||||
!_tcscmp(szResXY, _T("1152x864")) ||
|
||||
!_tcscmp(szResXY, _T("1120x832")) ||
|
||||
!_tcscmp(szResXY, _T("1152x864")) ||
|
||||
!_tcscmp(szResXY, _T("1280x960")) ||
|
||||
!_tcscmp(szResXY, _T("1280x1024")) ||
|
||||
!_tcscmp(szResXY, _T("1400x1050")) ||
|
||||
!_tcscmp(szResXY, _T("1280x1024")) ||
|
||||
!_tcscmp(szResXY, _T("1400x1050")) ||
|
||||
!_tcscmp(szResXY, _T("1600x1200")) ||
|
||||
!_tcscmp(szResXY, _T("2048x1536")) ||
|
||||
!_tcscmp(szResXY, _T("2800x2100")) ||
|
||||
!_tcscmp(szResXY, _T("3200x2400")) ||
|
||||
!_tcscmp(szResXY, _T("3200x2400")) ||
|
||||
!_tcscmp(szResXY, _T("4096x3072")) ||
|
||||
!_tcscmp(szResXY, _T("6400x4800")) ){
|
||||
nVidScrnAspectX = 4;
|
||||
nVidScrnAspectX = 4;
|
||||
nVidScrnAspectY = 3;
|
||||
}
|
||||
|
||||
// Normal LCD (5:4) ( Verified at Wikipedia.Org )
|
||||
if( !_tcscmp(szResXY, _T("320x256")) ||
|
||||
!_tcscmp(szResXY, _T("640x512")) ||
|
||||
!_tcscmp(szResXY, _T("1280x1024")) ||
|
||||
!_tcscmp(szResXY, _T("1280x1024")) ||
|
||||
!_tcscmp(szResXY, _T("2560x2048")) ||
|
||||
!_tcscmp(szResXY, _T("5120x4096")) ){
|
||||
nVidScrnAspectX = 5;
|
||||
nVidScrnAspectX = 5;
|
||||
nVidScrnAspectY = 4;
|
||||
}
|
||||
|
||||
|
@ -562,21 +562,21 @@ void MonitorAutoCheck()
|
|||
!_tcscmp(szResXY, _T("1360x768")) ||
|
||||
!_tcscmp(szResXY, _T("1366x768")) ||
|
||||
!_tcscmp(szResXY, _T("1920x1080"))) {
|
||||
nVidScrnAspectX = 16;
|
||||
nVidScrnAspectX = 16;
|
||||
nVidScrnAspectY = 9;
|
||||
}
|
||||
|
||||
// LCD Widescreen (16:10) ( Verified at Wikipedia.Org )
|
||||
if( !_tcscmp(szResXY, _T("320x200")) ||
|
||||
if( !_tcscmp(szResXY, _T("320x200")) ||
|
||||
!_tcscmp(szResXY, _T("1280x800")) ||
|
||||
!_tcscmp(szResXY, _T("1440x900")) ||
|
||||
!_tcscmp(szResXY, _T("1440x900")) ||
|
||||
!_tcscmp(szResXY, _T("1680x1050")) ||
|
||||
!_tcscmp(szResXY, _T("1920x1200")) ||
|
||||
!_tcscmp(szResXY, _T("2560x1600")) ||
|
||||
!_tcscmp(szResXY, _T("3840x2400")) ||
|
||||
!_tcscmp(szResXY, _T("5120x3200")) ||
|
||||
!_tcscmp(szResXY, _T("7680x4800")) ){
|
||||
nVidScrnAspectX = 16;
|
||||
nVidScrnAspectX = 16;
|
||||
nVidScrnAspectY = 10;
|
||||
}
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ void MonitorAutoCheck()
|
|||
bool SetNumLock(bool bState)
|
||||
{
|
||||
BYTE keyState[256];
|
||||
|
||||
|
||||
if (bNoChangeNumLock) return 0;
|
||||
|
||||
GetKeyboardState(keyState);
|
||||
|
@ -613,10 +613,10 @@ static int AppInit()
|
|||
|
||||
// Create a handle to the main thread of execution
|
||||
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);
|
||||
|
||||
|
||||
// Init the Burn library
|
||||
BurnLibInit();
|
||||
|
||||
|
||||
// Load config for the application
|
||||
ConfigAppLoad();
|
||||
|
||||
|
@ -656,14 +656,14 @@ static int AppInit()
|
|||
|
||||
// Build the ROM information
|
||||
CreateROMInfo(NULL);
|
||||
|
||||
|
||||
// Write a clrmame dat file if we are verifying roms
|
||||
#if defined (ROM_VERIFY)
|
||||
create_datfile(_T("fba.dat"), 0);
|
||||
create_datfile(_T("fba.dat"), 0);
|
||||
#endif
|
||||
|
||||
bNumlockStatus = SetNumLock(false);
|
||||
|
||||
|
||||
if(bEnableIcons && !bIconsLoaded) {
|
||||
// load driver icons
|
||||
LoadDrvIcons();
|
||||
|
@ -680,7 +680,7 @@ static int AppExit()
|
|||
UnloadDrvIcons();
|
||||
bIconsLoaded = 0;
|
||||
}
|
||||
|
||||
|
||||
SetNumLock(bNumlockStatus);
|
||||
|
||||
DrvExit(); // Make sure any game driver is exitted
|
||||
|
@ -777,22 +777,22 @@ int ProcessCmdLine()
|
|||
write_datfile(DAT_ARCADE_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfomdonly")) == 0) {
|
||||
write_datfile(DAT_MEGADRIVE_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfopceonly")) == 0) {
|
||||
write_datfile(DAT_PCENGINE_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfotg16only")) == 0) {
|
||||
write_datfile(DAT_TG16_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfosgxonly")) == 0) {
|
||||
write_datfile(DAT_SGX_ONLY, stdout);
|
||||
return 1;
|
||||
|
@ -807,12 +807,12 @@ int ProcessCmdLine()
|
|||
write_datfile(DAT_COLECO_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfosmsonly")) == 0) {
|
||||
write_datfile(DAT_MASTERSYSTEM_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfoggonly")) == 0) {
|
||||
write_datfile(DAT_GAMEGEAR_ONLY, stdout);
|
||||
return 1;
|
||||
|
@ -822,12 +822,12 @@ int ProcessCmdLine()
|
|||
write_datfile(DAT_MSX_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listinfospectrumonly")) == 0) {
|
||||
write_datfile(DAT_SPECTRUM_ONLY, stdout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (_tcscmp(szName, _T("-listextrainfo")) == 0) {
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
|
@ -838,7 +838,7 @@ int ProcessCmdLine()
|
|||
BurnDrvGetVisibleSize(&nWidth, &nHeight);
|
||||
BurnDrvGetAspect(&nAspectX, &nAspectY);
|
||||
printf("%s\t%ix%i\t%i:%i\t0x%08X\t\"%s\"\t%i\t%i\t%x\t%x\t\"%s\"\n", BurnDrvGetTextA(DRV_NAME), nWidth, nHeight, nAspectX, nAspectY, BurnDrvGetHardwareCode(), BurnDrvGetTextA(DRV_SYSTEM), BurnDrvIsWorking(), BurnDrvGetMaxPlayers(), BurnDrvGetGenreFlags(), BurnDrvGetFamilyFlags(), BurnDrvGetTextA(DRV_COMMENT));
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -955,7 +955,7 @@ static void CreateSupportFolders()
|
|||
{_T("msx/")},
|
||||
{_T("spectrum/")},
|
||||
};
|
||||
|
||||
|
||||
for(int x = 0; x < 34; x++) {
|
||||
CreateDirectory(szSupportDirs[x], NULL);
|
||||
}
|
||||
|
@ -982,7 +982,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nShowCmd
|
|||
// public version
|
||||
_stprintf(szAppBurnVer, _T("%x.%x.%x"), nBurnVer >> 20, (nBurnVer >> 16) & 0x0F, (nBurnVer >> 8) & 0xFF);
|
||||
}
|
||||
|
||||
|
||||
#if !defined (DONT_DISPLAY_SPLASH)
|
||||
// if (lpCmdLine[0] == 0) SplashCreate();
|
||||
#endif
|
||||
|
@ -1018,7 +1018,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nShowCmd
|
|||
#undef DIRCNT
|
||||
|
||||
//
|
||||
|
||||
|
||||
{
|
||||
INITCOMMONCONTROLSEX initCC = {
|
||||
sizeof(INITCOMMONCONTROLSEX),
|
||||
|
@ -1047,7 +1047,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nShowCmd
|
|||
|
||||
ConfigAppSave(); // Save config for the application
|
||||
|
||||
AppExit(); // Exit the application
|
||||
AppExit(); // Exit the application
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ static int MemCardRead(TCHAR* szFilename, unsigned char* pData, int nSize)
|
|||
if (fp == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
fread(szReadHeader, 1, 8, fp); // Read identifiers
|
||||
if (memcmp(szReadHeader, szHeader, 8) == 0) {
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ int MenuCreate()
|
|||
hAudioPluginMenu[0] = FBALoadMenu(hAppInst, MAKEINTRESOURCE(IDR_MENU_AUD_PLUGIN_1));
|
||||
hAudioPluginMenu[1] = FBALoadMenu(hAppInst, MAKEINTRESOURCE(IDR_MENU_AUD_PLUGIN_2));
|
||||
}
|
||||
|
||||
|
||||
if (hMenuPopup == NULL) {
|
||||
hMenuPopup = CreatePopupMenu();
|
||||
|
||||
|
@ -370,7 +370,7 @@ int MenuCreate()
|
|||
|
||||
SendMessage(hMenubar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||
SendMessage(hMenubar, TB_SETBITMAPSIZE, 0, 0);
|
||||
|
||||
|
||||
// Reset window menu to default
|
||||
GetSystemMenu(hScrnWnd, TRUE);
|
||||
|
||||
|
@ -424,7 +424,7 @@ int MenuCreate()
|
|||
|
||||
SendMessage(hMenubar, TB_ADDBUTTONS, 1, (LPARAM)&button);
|
||||
}
|
||||
|
||||
|
||||
SendMessage(hMenubar, TB_AUTOSIZE, 0, 0);
|
||||
|
||||
return 0;
|
||||
|
@ -456,7 +456,7 @@ void MenuDestroy()
|
|||
hBlitterMenu[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (hAudioPluginMenu[i]) {
|
||||
DestroyMenu(hAudioPluginMenu[i]);
|
||||
|
@ -495,7 +495,7 @@ void CreateArcaderesItem()
|
|||
// vertical oriented
|
||||
TCHAR szItemText2[256];
|
||||
MENUITEMINFO menuItem2 = {sizeof(MENUITEMINFO), MIIM_TYPE, MFT_STRING, 0, 0, NULL, NULL, NULL, 0, szItemText2, 0, 0, };
|
||||
|
||||
|
||||
FBALoadString(hAppInst, IDS_MENU_0, szItemText2, 256);
|
||||
if (bDrvOkay && BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL) {
|
||||
BurnDrvGetVisibleSize(&nGameWidth, &nGameHeight);
|
||||
|
@ -612,7 +612,7 @@ static void CreateCDItems()
|
|||
if (_tcslen(szImage) > 13) {
|
||||
_sntprintf(szImage + 13, 8, _T("..."));
|
||||
}
|
||||
|
||||
|
||||
_sntprintf(szItemText + length - 1, 256 - length, szImage);
|
||||
}
|
||||
menuItem.cch = _tcslen(szItemText);
|
||||
|
@ -632,7 +632,7 @@ void MenuUpdate()
|
|||
|
||||
CheckMenuItem(hMenu, MENU_PAUSE, bAltPause ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_ALLRAM, bDrvSaveAll ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
|
||||
// CreateCDItems();
|
||||
// CheckMenuRadioItem(hMenu, MENU_CDIMAGE, MENU_CDIMAGE, MENU_CDIMAGE + nCDEmuSelect, MF_BYCOMMAND);
|
||||
|
||||
|
@ -844,7 +844,7 @@ void MenuUpdate()
|
|||
}
|
||||
}
|
||||
CheckMenuRadioItem(hMenu, MENU_GAMMA_USE_HARDWARE, MENU_GAMMA_SOFTWARE_ONLY, var, MF_BYCOMMAND);
|
||||
|
||||
|
||||
CheckMenuItem(hMenu, MENU_AUTOSWITCHFULL, bVidAutoSwitchFull ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
if (nVidTransferMethod == 0) {
|
||||
|
@ -857,7 +857,7 @@ void MenuUpdate()
|
|||
}
|
||||
}
|
||||
CheckMenuRadioItem(hMenu, MENU_BASIC_MEMAUTO, MENU_BASIC_SYSMEM, var, MF_BYCOMMAND);
|
||||
|
||||
|
||||
if (nVidTransferMethod == 0) {
|
||||
var = MENU_SOFTFX_VIDEOMEM;
|
||||
} else {
|
||||
|
@ -868,14 +868,14 @@ void MenuUpdate()
|
|||
}
|
||||
}
|
||||
CheckMenuRadioItem(hMenu, MENU_SOFTFX_MEMAUTO, MENU_SOFTFX_SYSMEM, var, MF_BYCOMMAND);
|
||||
|
||||
|
||||
if (nWindowSize <= 4) {
|
||||
var = MENU_AUTOSIZE + nWindowSize;
|
||||
} else {
|
||||
var = MENU_MAXIMUMSIZEWINDOW;
|
||||
}
|
||||
CheckMenuRadioItem(hMenu, MENU_AUTOSIZE, MENU_MAXIMUMSIZEWINDOW, var, MF_BYCOMMAND);
|
||||
|
||||
|
||||
CheckMenuItem(hMenu, MENU_MONITORAUTOCHECK, bMonitorAutoCheck ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
var = -1;
|
||||
|
@ -901,7 +901,7 @@ void MenuUpdate()
|
|||
CheckMenuItem(hMenu, MENU_FORCE60HZ, bForce60Hz ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_VIDEOVSYNC, bVidVSync ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_AUTOFRAMESKIP, !bAlwaysDrawFrames ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
|
||||
var = nAudSelect + MENU_AUD_PLUGIN_1;
|
||||
CheckMenuRadioItem(hMenu, MENU_AUD_PLUGIN_1, MENU_AUD_PLUGIN_8, var, MF_BYCOMMAND);
|
||||
|
||||
|
@ -927,7 +927,7 @@ void MenuUpdate()
|
|||
CheckMenuItem(hMenu, MENU_DSOUND_BASS, nAudDSPModule[0] ? MF_CHECKED : MF_UNCHECKED);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 1: {
|
||||
var = MENU_XAUDIO_NOSOUND;
|
||||
if (nAudSampleRate[1] > 0) {
|
||||
|
@ -979,7 +979,7 @@ void MenuUpdate()
|
|||
CheckMenuItem(hMenu, MENU_SAVEHISCORES, EnableHiscores ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_USEBLEND, bBurnUseBlend ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_GEARSHIFT, BurnShiftEnabled ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
|
||||
#ifdef INCLUDE_AVI_RECORDING
|
||||
if (nAvi3x <= 1) {
|
||||
nAvi3x = 1;
|
||||
|
@ -1033,40 +1033,40 @@ void MenuUpdate()
|
|||
|
||||
var = MENU_ICONS_SIZE_16;
|
||||
switch (nIconsSize) {
|
||||
case ICON_16x16: var = MENU_ICONS_SIZE_16; break;
|
||||
case ICON_24x24: var = MENU_ICONS_SIZE_24; break;
|
||||
case ICON_16x16: var = MENU_ICONS_SIZE_16; break;
|
||||
case ICON_24x24: var = MENU_ICONS_SIZE_24; break;
|
||||
case ICON_32x32: var = MENU_ICONS_SIZE_32; break;
|
||||
}
|
||||
CheckMenuRadioItem(hMenu, MENU_ICONS_SIZE_16, MENU_ICONS_SIZE_32, var, MF_BYCOMMAND);
|
||||
CheckMenuItem(hMenu, MENU_ENABLEICONS, bEnableIcons ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(hMenu, MENU_ICONS_PARENTSONLY, bIconsOnlyParents ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
|
||||
// Previous games list
|
||||
for (int i = 0; i < SHOW_PREV_GAMES; i++) {
|
||||
MENUITEMINFO menuItemInfo;
|
||||
TCHAR szText[256] = _T("");
|
||||
int OldDrvSelect = nBurnDrvActive;
|
||||
|
||||
|
||||
memset(&menuItemInfo, 0, sizeof(MENUITEMINFO));
|
||||
menuItemInfo.cbSize = sizeof(MENUITEMINFO);
|
||||
menuItemInfo.fType = MFT_STRING;
|
||||
menuItemInfo.fMask = MIIM_TYPE;
|
||||
|
||||
menuItemInfo.fMask = MIIM_TYPE;
|
||||
|
||||
if (_tcslen(szPrevGames[i])) {
|
||||
for (unsigned int j = 0; j < nBurnDrvCount; j++) {
|
||||
nBurnDrvActive = j;
|
||||
if (!_tcsicmp(szPrevGames[i], BurnDrvGetText(DRV_NAME))) {
|
||||
_stprintf(szText, _T("%s\t%s"), BurnDrvGetText(DRV_FULLNAME), BurnDrvGetText(DRV_NAME));
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check for &s and change to &&
|
||||
TCHAR szText2[256] = _T("");
|
||||
TCHAR *Tokens = NULL;
|
||||
int NumTokens = 0;
|
||||
|
||||
|
||||
Tokens = _tcstok(szText, _T("&"));
|
||||
while (Tokens != NULL) {
|
||||
if (NumTokens) {
|
||||
|
@ -1074,29 +1074,29 @@ void MenuUpdate()
|
|||
} else {
|
||||
_stprintf(szText2, _T("%s"), Tokens);
|
||||
}
|
||||
|
||||
|
||||
Tokens = _tcstok(NULL, _T("&"));
|
||||
NumTokens++;
|
||||
}
|
||||
|
||||
|
||||
menuItemInfo.dwTypeData = szText2;
|
||||
menuItemInfo.cch = _tcslen(szText2);
|
||||
|
||||
|
||||
SetMenuItemInfo(hMenu, MENU_PREVIOUSGAMES1 + i, FALSE, &menuItemInfo);
|
||||
EnableMenuItem(hMenu, MENU_PREVIOUSGAMES1 + i, MF_ENABLED | MF_BYCOMMAND);
|
||||
} else {
|
||||
_tcscpy(szText, FBALoadStringEx(hAppInst, IDS_MENU_6, true));
|
||||
|
||||
|
||||
menuItemInfo.dwTypeData = szText;
|
||||
menuItemInfo.cch = _tcslen(szText);
|
||||
|
||||
|
||||
SetMenuItemInfo(hMenu, MENU_PREVIOUSGAMES1 + i, FALSE, &menuItemInfo);
|
||||
EnableMenuItem(hMenu, MENU_PREVIOUSGAMES1 + i, MF_GRAYED | MF_BYCOMMAND);
|
||||
}
|
||||
|
||||
nBurnDrvActive = OldDrvSelect;
|
||||
|
||||
nBurnDrvActive = OldDrvSelect;
|
||||
}
|
||||
|
||||
|
||||
#if !defined BUILD_X86_ASM
|
||||
EnableMenuItem(hMenu, MENU_ENHANCED_SOFT_2XPM_LQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_ENHANCED_SOFT_2XPM_HQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
@ -1112,7 +1112,7 @@ void MenuUpdate()
|
|||
EnableMenuItem(hMenu, MENU_ENHANCED_SOFT_HQ2X, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_ENHANCED_SOFT_HQ3X, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_ENHANCED_SOFT_HQ4X, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_2XPM_LQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_2XPM_HQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_EAGLE, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
@ -1127,7 +1127,7 @@ void MenuUpdate()
|
|||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_HQ2X, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_HQ3X, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_SOFTFX_SOFT_HQ4X, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_DX9_ALT_SOFT_2XPM_LQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_DX9_ALT_SOFT_2XPM_HQ, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_DX9_ALT_SOFT_EAGLE, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
@ -1153,7 +1153,7 @@ void MenuEnableItems()
|
|||
{
|
||||
CreateArcaderesItem();
|
||||
CreatepresetResItems();
|
||||
|
||||
|
||||
if (hBlitterMenu[nVidSelect]) {
|
||||
MENUITEMINFO myMenuItemInfo;
|
||||
myMenuItemInfo.cbSize = sizeof(MENUITEMINFO);
|
||||
|
@ -1169,7 +1169,7 @@ void MenuEnableItems()
|
|||
myMenuItemInfo.hSubMenu = NULL;
|
||||
SetMenuItemInfo(GetSubMenu(hMenu, 1), 1, TRUE, &myMenuItemInfo);
|
||||
}
|
||||
|
||||
|
||||
if (hBlitterMenu[nAudSelect]) {
|
||||
MENUITEMINFO myMenuItemInfo;
|
||||
myMenuItemInfo.cbSize = sizeof(MENUITEMINFO);
|
||||
|
@ -1259,9 +1259,9 @@ void MenuEnableItems()
|
|||
#endif
|
||||
EnableMenuItem(hMenu, MENU_SAVEHISCORES, MF_ENABLED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_USEBLEND, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_CDIMAGE, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_1, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_2, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
||||
|
@ -1316,7 +1316,7 @@ void MenuEnableItems()
|
|||
if (pCheatInfo) {
|
||||
EnableMenuItem(hMenu, MENU_ENABLECHEAT, MF_ENABLED | MF_BYCOMMAND);
|
||||
}
|
||||
|
||||
|
||||
if (CheatSearchInit()) {
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_START, MF_ENABLED | MF_BYCOMMAND);
|
||||
}
|
||||
|
@ -1442,7 +1442,7 @@ void MenuEnableItems()
|
|||
EnableMenuItem(hMenu, MENU_AVISTOP, MF_GRAYED | MF_BYCOMMAND);
|
||||
#endif
|
||||
EnableMenuItem(hMenu, MENU_CDIMAGE, MF_ENABLED | MF_BYCOMMAND);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_1, MF_ENABLED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_AUD_PLUGIN_2, MF_ENABLED | MF_BYCOMMAND);
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ BOOL DetectWindowsVersion()
|
|||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
|
||||
GetVersionEx(&osvi);
|
||||
|
||||
|
||||
// osvi.dwMajorVersion returns the windows version: 5 = XP 6 = Vista/7
|
||||
// osvi.dwMinorVersion returns the minor version, XP and 7 = 1, Vista = 0
|
||||
bIsWindowsXPorLater = ((osvi.dwMajorVersion > 5) || ( (osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion >= 1)));
|
||||
bIsWindowsXP = (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1);
|
||||
bIsWindows8OrGreater = ((osvi.dwMajorVersion > 6) || ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion >= 2)));
|
||||
|
||||
|
||||
return bIsWindowsXPorLater;
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ void EnableHighResolutionTiming()
|
|||
TIMECAPS hTCaps;
|
||||
|
||||
bHighResolutionTimerActive = 0;
|
||||
|
||||
|
||||
if (bEnableHighResTimer) {
|
||||
#ifdef PRINT_DEBUG_INFO
|
||||
dprintf(_T(" ** Enabling High-Resolution system timer.\n"));
|
||||
|
|
|
@ -11,11 +11,11 @@ static int nPaletteEntries;
|
|||
static void CalcBrushes(int nStartColour)
|
||||
{
|
||||
int Colour, r, g, b;
|
||||
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
DeleteObject(PaletteBrush[i]);
|
||||
PaletteBrush[i] = NULL;
|
||||
|
||||
|
||||
if (i + nStartColour < nPaletteEntries) {
|
||||
Colour = pBurnDrvPalette[i + nStartColour];
|
||||
|
||||
|
@ -46,7 +46,7 @@ static void CalcBrushes(int nStartColour)
|
|||
static void UpdateLabels()
|
||||
{
|
||||
TCHAR szItemText[10];
|
||||
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
int nLabel = nPalettePosition + (i * 16);
|
||||
szItemText[0] = _T('\0');
|
||||
|
@ -64,23 +64,23 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (!kNetGame && bAutoPause) bRunPause = 1;
|
||||
AudSoundStop();
|
||||
}
|
||||
|
||||
|
||||
for (int y = 0; y < 16; y++) {
|
||||
for (int x = 0; x < 16; x++) {
|
||||
PaletteControl[(y * 16) + x] = CreateWindowEx(0, _T("STATIC"), NULL, WS_CHILD | WS_VISIBLE | SS_NOTIFY, (x * 21) + 38, (y * 21) + 21, 20, 20, hPaletteViewerDlg, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nPaletteEntries = BurnDrvGetPaletteEntries();
|
||||
nPalettePosition = 0x0000;
|
||||
CalcBrushes(nPalettePosition);
|
||||
|
||||
|
||||
WndInMid(hDlg, hParent);
|
||||
SetFocus(hDlg);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (Msg == WM_CTLCOLORSTATIC) {
|
||||
for (int i = 0; i < 256; i++) {
|
||||
if ((HWND)lParam == PaletteControl[i]) {
|
||||
|
@ -89,41 +89,41 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Msg == WM_CLOSE) {
|
||||
for (int i = 0; i < 256; i++) {
|
||||
DeleteObject(PaletteBrush[i]);
|
||||
PaletteBrush[i] = NULL;
|
||||
PaletteControl[i] = NULL;
|
||||
}
|
||||
|
||||
|
||||
nPalettePosition = 0;
|
||||
nPaletteEntries = 0;
|
||||
|
||||
|
||||
EndDialog(hPaletteViewerDlg, 0);
|
||||
|
||||
|
||||
EnableWindow(hScrnWnd, TRUE);
|
||||
DestroyWindow(hPaletteViewerDlg);
|
||||
|
||||
|
||||
if (bDrvOkay) {
|
||||
if(!bAltPause && bRunPause) bRunPause = 0;
|
||||
AudSoundPlay();
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Msg == WM_COMMAND) {
|
||||
int Id = LOWORD(wParam);
|
||||
int Notify = HIWORD(wParam);
|
||||
|
||||
|
||||
if (Notify == STN_CLICKED) {
|
||||
TCHAR szText[100];
|
||||
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
if ((HWND)lParam == PaletteControl[i]) {
|
||||
int Colour, r, g, b;
|
||||
|
||||
|
||||
Colour = pBurnDrvPalette[i + nPalettePosition];
|
||||
|
||||
if (nVidImageDepth < 16 || (BurnDrvGetFlags() & BDF_16BIT_ONLY)) {
|
||||
|
@ -151,12 +151,12 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDCANCEL && Notify == BN_CLICKED) {
|
||||
SendMessage(hPaletteViewerDlg, WM_CLOSE, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDC_GFX_VIEWER_PREV && Notify == BN_CLICKED) {
|
||||
nPalettePosition -= 0x100;
|
||||
if (nPalettePosition < 0) nPalettePosition = nPaletteEntries - 0x100; // last page
|
||||
|
@ -166,7 +166,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
UpdateLabels();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (Id == IDC_GFX_VIEWER_NEXT && Notify == BN_CLICKED) {
|
||||
nPalettePosition += 0x100;
|
||||
if (nPalettePosition >= nPaletteEntries) nPalettePosition = 0x0000;
|
||||
|
@ -176,7 +176,7 @@ static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -186,10 +186,10 @@ int PaletteViewerDialogCreate(HWND hParentWND)
|
|||
bprintf(PRINT_IMPORTANT, _T("No DrvPalette associated with this game.\n"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
hParent = hParentWND;
|
||||
FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_PALETTEVIEWER), hParent, (DLGPROC)DialogProc);
|
||||
|
||||
|
||||
hParent = NULL;
|
||||
hPaletteViewerDlg = NULL;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ int SelectPlaceHolder()
|
|||
|
||||
szPlaceHolder[0] = _T('\0');
|
||||
memcpy(szPlaceHolder, szChoice, sizeof(szChoice));
|
||||
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ int FBAPopupDestroyText()
|
|||
int FBAPopupDisplay(int nFlags)
|
||||
{
|
||||
HMODULE hRiched = NULL;
|
||||
|
||||
|
||||
#if defined (_UNICODE)
|
||||
hRiched = LoadLibrary(L"RICHED20.DLL");
|
||||
#else
|
||||
|
|
|
@ -64,7 +64,7 @@ static INT_PTR CALLBACK ResProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM) // L
|
|||
if(nOrientation == HORIZONTAL_ORIENTED_RES) {
|
||||
nVidHorWidth = nItemValue >> 16;
|
||||
nVidHorHeight = nItemValue & 0xFFFF;
|
||||
}
|
||||
}
|
||||
if(nOrientation == VERTICAL_ORIENTED_RES) {
|
||||
nVidVerWidth = nItemValue >> 16;
|
||||
nVidVerHeight = nItemValue & 0xFFFF;
|
||||
|
|
|
@ -44,7 +44,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
// Setup the tabs
|
||||
hTabControl = GetDlgItem(hDlg, IDC_ROMPATH_TAB);
|
||||
|
||||
TC_ITEM tcItem;
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
|
||||
UINT idsString[20] = { IDS_ROMPATH_1,IDS_ROMPATH_2,IDS_ROMPATH_3,IDS_ROMPATH_4,IDS_ROMPATH_5,IDS_ROMPATH_6,IDS_ROMPATH_7,IDS_ROMPATH_8,IDS_ROMPATH_9,IDS_ROMPATH_10,IDS_ROMPATH_11,IDS_ROMPATH_12,IDS_ROMPATH_13,IDS_ROMPATH_14,IDS_ROMPATH_15,IDS_ROMPATH_16,IDS_ROMPATH_17,IDS_ROMPATH_18,IDS_ROMPATH_19,IDS_ROMPATH_20 };
|
||||
|
@ -55,7 +55,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
|
||||
|
||||
// hide all controls excluding the selected controls
|
||||
for(int x = 0; x < 20; x++) {
|
||||
if(x != TabPage) {
|
||||
|
@ -80,7 +80,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (pNmHdr->code == TCN_SELCHANGE) {
|
||||
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
|
||||
|
||||
// hide all controls excluding the selected controls
|
||||
for(int x = 0; x < 20; x++) {
|
||||
if(x != TabPage) {
|
||||
|
@ -92,7 +92,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
// Show the proper controls
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_ROMSDIR_BR1 + TabPage), SW_SHOW); // browse buttons
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_ROMSDIR_EDIT1 + TabPage), SW_SHOW); // edit controls
|
||||
|
||||
|
||||
UpdateWindow(hDlg);
|
||||
|
||||
return FALSE;
|
||||
|
@ -172,7 +172,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
int RomsDirCreate(HWND hParentWND)
|
||||
{
|
||||
hParent = hParentWND;
|
||||
|
||||
|
||||
FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_ROMSDIR), hParent, (DLGPROC)DefInpProc);
|
||||
return 1;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ int CheckGameAvb()
|
|||
CreateRomDatName(szRomDat);
|
||||
|
||||
if ((h = _tfopen(szRomDat, _T("r"))) == NULL) {
|
||||
if (buffer)
|
||||
if (buffer)
|
||||
{
|
||||
free(buffer);
|
||||
buffer = NULL;
|
||||
|
@ -390,7 +390,7 @@ static INT_PTR CALLBACK WaitProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lPar
|
|||
hScanThread = (HANDLE)_beginthreadex(NULL, 0, AnalyzingRoms, NULL, 0, &ScanThreadId);
|
||||
|
||||
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
|
||||
|
||||
if (hParent == NULL) {
|
||||
RECT rect;
|
||||
int x, y;
|
||||
|
|
|
@ -448,8 +448,8 @@ int RunMessageLoop()
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
// 'Silence' & 'Sound Restored' Code (added by CaptainCPS-X)
|
||||
|
||||
// 'Silence' & 'Sound Restored' Code (added by CaptainCPS-X)
|
||||
case 'S': {
|
||||
TCHAR buffer[60];
|
||||
bMute = !bMute;
|
||||
|
@ -469,7 +469,7 @@ int RunMessageLoop()
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case VK_OEM_PLUS: {
|
||||
if (bMute) break; // if mute, not do this
|
||||
nOldAudVolume = nAudVolume;
|
||||
|
|
|
@ -303,7 +303,7 @@ static void DoNetGame()
|
|||
free(gameList);
|
||||
gameList = NULL;
|
||||
}
|
||||
|
||||
|
||||
End_Network();
|
||||
|
||||
POST_INITIALISE_MESSAGE;
|
||||
|
@ -313,7 +313,7 @@ int CreateDatfileWindows(int bType)
|
|||
{
|
||||
TCHAR szTitle[1024];
|
||||
TCHAR szFilter[1024];
|
||||
|
||||
|
||||
TCHAR szConsoleString[64];
|
||||
_sntprintf(szConsoleString, 64, _T(""));
|
||||
if (bType == DAT_MEGADRIVE_ONLY) _sntprintf(szConsoleString, 64, _T(", Megadrive only"));
|
||||
|
@ -327,9 +327,9 @@ int CreateDatfileWindows(int bType)
|
|||
if (bType == DAT_MSX_ONLY) _sntprintf(szConsoleString, 64, _T(", MSX 1 Games only"));
|
||||
if (bType == DAT_SPECTRUM_ONLY) _sntprintf(szConsoleString, 64, _T(", ZX Spectrum Games only"));
|
||||
|
||||
TCHAR szProgramString[25];
|
||||
TCHAR szProgramString[25];
|
||||
_sntprintf(szProgramString, 25, _T("ClrMame Pro XML"));
|
||||
|
||||
|
||||
_sntprintf(szChoice, MAX_PATH, _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), szAppBurnVer, szProgramString, szConsoleString);
|
||||
_sntprintf(szTitle, 256, FBALoadStringEx(hAppInst, IDS_DAT_GENERATE, true), szProgramString);
|
||||
|
||||
|
@ -363,10 +363,10 @@ int CreateAllDatfilesWindows()
|
|||
ITEMIDLIST* pItemIDList = NULL;
|
||||
TCHAR buffer[MAX_PATH];
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
TCHAR szProgramString[25];
|
||||
|
||||
TCHAR szProgramString[25];
|
||||
|
||||
_sntprintf(szProgramString, 25, _T("ClrMame Pro XML"));
|
||||
|
||||
|
||||
SHGetMalloc(&pMalloc);
|
||||
|
||||
memset(&bInfo, 0, sizeof(bInfo));
|
||||
|
@ -376,7 +376,7 @@ int CreateAllDatfilesWindows()
|
|||
bInfo.ulFlags = BIF_EDITBOX | BIF_RETURNONLYFSDIRS;
|
||||
|
||||
pItemIDList = SHBrowseForFolder(&bInfo);
|
||||
|
||||
|
||||
if (pItemIDList) {
|
||||
if (SHGetPathFromIDList(pItemIDList, buffer)) {
|
||||
int strLen = _tcslen(buffer);
|
||||
|
@ -390,40 +390,40 @@ int CreateAllDatfilesWindows()
|
|||
pMalloc->Free(pItemIDList);
|
||||
}
|
||||
pMalloc->Release();
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(""));
|
||||
create_datfile(szFilename, DAT_ARCADE_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", Megadrive only"));
|
||||
create_datfile(szFilename, DAT_MEGADRIVE_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", PC-Engine only"));
|
||||
create_datfile(szFilename, DAT_PCENGINE_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", TurboGrafx16 only"));
|
||||
create_datfile(szFilename, DAT_TG16_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", SuprGrafx only"));
|
||||
create_datfile(szFilename, DAT_SGX_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", Sega SG-1000 only"));
|
||||
create_datfile(szFilename, DAT_SG1000_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", ColecoVision only"));
|
||||
create_datfile(szFilename, DAT_COLECO_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", Master System only"));
|
||||
create_datfile(szFilename, DAT_MASTERSYSTEM_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", Game Gear only"));
|
||||
create_datfile(szFilename, DAT_GAMEGEAR_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", MSX 1 Games only"));
|
||||
create_datfile(szFilename, DAT_MSX_ONLY);
|
||||
|
||||
|
||||
_sntprintf(szFilename, MAX_PATH, _T("%s") _T(APP_TITLE) _T(" v%.20s (%s%s).dat"), buffer, szAppBurnVer, szProgramString, _T(", ZX Spectrum Games only"));
|
||||
create_datfile(szFilename, DAT_SPECTRUM_ONLY);
|
||||
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
@ -520,7 +520,7 @@ static int OnDisplayChange(HWND, UINT, UINT, UINT)
|
|||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/* Fixed right click mouse events, now they work properly without interfering
|
||||
/* Fixed right click mouse events, now they work properly without interfering
|
||||
with other applications in the background [CaptainCPS-X] */
|
||||
//----------------------------------------------------------------------------//
|
||||
bool bRDblClick = false;
|
||||
|
@ -530,8 +530,8 @@ static int OnRButtonDown(HWND hwnd, BOOL bDouble, int, int, UINT)
|
|||
if (hwnd != hScrnWnd && !nVidFullscreen) return 1;
|
||||
|
||||
if (bDouble) {
|
||||
// Right double-click at fullcreen happened, turn this flag 'true' so
|
||||
// when right double-click ends (OnRButtonUp) it doesn't do anything else.
|
||||
// Right double-click at fullcreen happened, turn this flag 'true' so
|
||||
// when right double-click ends (OnRButtonUp) it doesn't do anything else.
|
||||
bRDblClick = true;
|
||||
}
|
||||
return 1;
|
||||
|
@ -540,26 +540,26 @@ static int OnRButtonDown(HWND hwnd, BOOL bDouble, int, int, UINT)
|
|||
static int OnRButtonUp(HWND hwnd, int, int, UINT)
|
||||
{
|
||||
// If fullscreen and right double-click
|
||||
if (hwnd == hScrnWnd && nVidFullscreen && bRDblClick)
|
||||
if (hwnd == hScrnWnd && nVidFullscreen && bRDblClick)
|
||||
{
|
||||
// game running
|
||||
if (bDrvOkay)
|
||||
{
|
||||
if (bDrvOkay)
|
||||
{
|
||||
// toggle fullscreen
|
||||
nVidFullscreen = !nVidFullscreen;
|
||||
bRDblClick = false;
|
||||
bRDblClick = false;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If not fullscreen and this event is not related to 'toggle fullscreen' right double-click event
|
||||
if (!nVidFullscreen && !bRDblClick) {
|
||||
bMenuEnabled = !bMenuEnabled;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*************************************************************************/
|
||||
|
@ -646,7 +646,7 @@ static int OnLButtonDblClk(HWND hwnd, BOOL, int, int, UINT)
|
|||
POST_INITIALISE_MESSAGE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -694,7 +694,7 @@ void PausedRedraw(void)
|
|||
|
||||
static void OnPaint(HWND hWnd)
|
||||
{
|
||||
if (hWnd == hScrnWnd)
|
||||
if (hWnd == hScrnWnd)
|
||||
{
|
||||
VidPaint(1);
|
||||
|
||||
|
@ -731,8 +731,8 @@ static void UpdatePreviousGameList()
|
|||
{
|
||||
int nRecentIdenticalTo = -1;
|
||||
|
||||
// check if this game is identical to any of the listed in the recent menu
|
||||
for(int x = 0; x < SHOW_PREV_GAMES; x++) {
|
||||
// check if this game is identical to any of the listed in the recent menu
|
||||
for(int x = 0; x < SHOW_PREV_GAMES; x++) {
|
||||
if(!_tcscmp(BurnDrvGetText(DRV_NAME), szPrevGames[x])) {
|
||||
nRecentIdenticalTo = x;
|
||||
}
|
||||
|
@ -746,7 +746,7 @@ static void UpdatePreviousGameList()
|
|||
_tcscpy(szTmp[x], szPrevGames[x]);
|
||||
}
|
||||
|
||||
switch(nRecentIdenticalTo)
|
||||
switch(nRecentIdenticalTo)
|
||||
{
|
||||
case -1:
|
||||
// Normal rotation when recent game is not identical to any of the ones listed
|
||||
|
@ -762,7 +762,7 @@ static void UpdatePreviousGameList()
|
|||
_tcscpy(szPrevGames[1], szPrevGames[0]); // Recent 2 = 1
|
||||
_tcscpy(szPrevGames[0], BurnDrvGetText(DRV_NAME)); // Update most recent game played (Recent 1)
|
||||
break;
|
||||
case 0:
|
||||
case 0:
|
||||
break; // Nothing Change
|
||||
case 1:
|
||||
_tcscpy(szPrevGames[0], szTmp[1]); // Update most recent game played (Recent 1 = 2)
|
||||
|
@ -845,11 +845,11 @@ static bool bSramLoad = true; // always true, unless BurnerLoadDriver() is calle
|
|||
int BurnerLoadDriver(TCHAR *szDriverName)
|
||||
{
|
||||
unsigned int j;
|
||||
|
||||
|
||||
int nOldDrvSelect = nBurnDrvActive;
|
||||
DrvExit();
|
||||
bLoading = 1;
|
||||
|
||||
|
||||
for (j = 0; j < nBurnDrvCount; j++) {
|
||||
nBurnDrvActive = j;
|
||||
if (!_tcscmp(szDriverName, BurnDrvGetText(DRV_NAME)) && (!(BurnDrvGetFlags() & BDF_BOARDROM))) {
|
||||
|
@ -857,7 +857,7 @@ int BurnerLoadDriver(TCHAR *szDriverName)
|
|||
nDialogSelect = j;
|
||||
SplashDestroy(1);
|
||||
StopReplay();
|
||||
|
||||
|
||||
DrvExit();
|
||||
DrvInit(j, bSramLoad); // Init the game driver
|
||||
MenuEnableItems();
|
||||
|
@ -872,7 +872,7 @@ int BurnerLoadDriver(TCHAR *szDriverName)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -885,17 +885,17 @@ int StartFromReset(TCHAR *szDriverName)
|
|||
return 1;
|
||||
}
|
||||
//if(nBurnDrvActive < 1) return 0;
|
||||
|
||||
|
||||
int nOldDrvSelect = nBurnDrvActive;
|
||||
|
||||
DrvExit();
|
||||
bLoading = 1;
|
||||
|
||||
|
||||
nBurnDrvActive = nOldDrvSelect;
|
||||
nDialogSelect = nOldDrvSelect;
|
||||
SplashDestroy(1);
|
||||
StopReplay();
|
||||
|
||||
|
||||
DrvInit(nOldDrvSelect, false); // Init the game driver, without loading SRAM
|
||||
MenuEnableItems();
|
||||
bAltPause = 0;
|
||||
|
@ -939,7 +939,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
if (bLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch (id) {
|
||||
case MENU_LOAD: {
|
||||
int nGame;
|
||||
|
@ -961,7 +961,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
AudSoundStop(); // Stop while the dialog is active or we're loading ROMs
|
||||
|
||||
nGame = SelDialog(0, hScrnWnd); // Bring up select dialog to pick a driver
|
||||
|
||||
|
||||
extern bool bDialogCancel;
|
||||
|
||||
if (nGame >= 0 && bDialogCancel == false) {
|
||||
|
@ -997,20 +997,20 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
case MENU_PREVIOUSGAMES8:
|
||||
case MENU_PREVIOUSGAMES9:
|
||||
case MENU_PREVIOUSGAMES10: {
|
||||
BurnerLoadDriver(szPrevGames[id - MENU_PREVIOUSGAMES1]);
|
||||
BurnerLoadDriver(szPrevGames[id - MENU_PREVIOUSGAMES1]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_START_NEOGEO_MVS: {
|
||||
BurnerLoadDriver(_T("neogeo"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_START_NEOGEO_CD: {
|
||||
BurnerLoadDriver(_T("neocdz"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_LOAD_NEOCD: {
|
||||
AudBlankSound();
|
||||
if (UseDialogs()) {
|
||||
|
@ -1018,7 +1018,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CDIMAGE: {
|
||||
nCDEmuSelect = 0;
|
||||
TCHAR szFilter[100];
|
||||
|
@ -1135,7 +1135,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
MenuEnableItems();
|
||||
nDialogSelect = -1;
|
||||
nBurnDrvActive = ~0U;
|
||||
|
||||
|
||||
POST_INITIALISE_MESSAGE;
|
||||
}
|
||||
break;
|
||||
|
@ -1161,7 +1161,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
SetPauseMode(0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_INPUT:
|
||||
AudBlankSound();
|
||||
if (UseDialogs()) {
|
||||
|
@ -1372,7 +1372,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSizeHor = 0;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1381,7 +1381,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesHor = false;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
break;
|
||||
case MENU_DOUBLESIZESCREEN:
|
||||
|
@ -1389,7 +1389,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesHor = false;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
break;
|
||||
case MENU_TRIPLESIZESCREEN:
|
||||
|
@ -1397,7 +1397,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesHor = false;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
break;
|
||||
case MENU_QUADSIZESCREEN:
|
||||
|
@ -1405,7 +1405,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesHor = false;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
nVidWidth = nVidHorWidth;
|
||||
nVidHeight = nVidHorHeight;
|
||||
nVidHeight = nVidHorHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_2:
|
||||
|
@ -1430,7 +1430,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
nVidWidth = nVidHorWidth;
|
||||
nVidHeight = nVidHorHeight;
|
||||
nVidHeight = nVidHorHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_3:
|
||||
|
@ -1442,7 +1442,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
nVidWidth = nVidHorWidth;
|
||||
nVidHeight = nVidHorHeight;
|
||||
nVidHeight = nVidHorHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_4:
|
||||
|
@ -1454,7 +1454,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
nVidWidth = nVidHorWidth;
|
||||
nVidHeight = nVidHorHeight;
|
||||
nVidHeight = nVidHorHeight;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1464,14 +1464,14 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSizeHor = 0;
|
||||
if ((bDrvOkay) && !(BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
bVidArcaderes = bVidArcaderesHor;
|
||||
}
|
||||
AudBlankSound();
|
||||
InputSetCooperativeLevel(false, bAlwaysProcessKeyboardInput);
|
||||
ResCreate(HORIZONTAL_ORIENTED_RES);
|
||||
GameInpCheckMouse();
|
||||
break;
|
||||
|
||||
|
||||
case MENU_FULLSCREEN_MONITOR:
|
||||
if (UseDialogs()) {
|
||||
AudBlankSound();
|
||||
|
@ -1480,13 +1480,13 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
|
||||
// Vertical
|
||||
// Vertical
|
||||
case MENU_RES_ARCADE_VERTICAL:
|
||||
bVidArcaderesVer = !bVidArcaderesVer;
|
||||
nScreenSizeVer = 0;
|
||||
if ((bDrvOkay) && (BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1495,7 +1495,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesVer = false;
|
||||
if ((bDrvOkay) && (BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
}
|
||||
break;
|
||||
case MENU_DOUBLESIZESCREEN_VERTICAL:
|
||||
|
@ -1503,7 +1503,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesVer = false;
|
||||
if ((bDrvOkay) && (BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
}
|
||||
break;
|
||||
case MENU_TRIPLESIZESCREEN_VERTICAL:
|
||||
|
@ -1511,7 +1511,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesVer = false;
|
||||
if ((bDrvOkay) && (BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
}
|
||||
break;
|
||||
case MENU_QUADSIZESCREEN_VERTICAL:
|
||||
|
@ -1519,7 +1519,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidArcaderesVer = false;
|
||||
if ((bDrvOkay) && (BurnDrvGetFlags() & BDF_ORIENTATION_VERTICAL)) {
|
||||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1532,7 +1532,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
nVidWidth = nVidVerWidth;
|
||||
nVidHeight = nVidVerHeight;
|
||||
nVidHeight = nVidVerHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_2_VERTICAL:
|
||||
|
@ -1544,7 +1544,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
nVidWidth = nVidVerWidth;
|
||||
nVidHeight = nVidVerHeight;
|
||||
nVidHeight = nVidVerHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_3_VERTICAL:
|
||||
|
@ -1556,7 +1556,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
nVidWidth = nVidVerWidth;
|
||||
nVidHeight = nVidVerHeight;
|
||||
nVidHeight = nVidVerHeight;
|
||||
}
|
||||
break;
|
||||
case MENU_RES_4_VERTICAL:
|
||||
|
@ -1568,7 +1568,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nScreenSize = nScreenSizeVer;
|
||||
bVidArcaderes = bVidArcaderesVer;
|
||||
nVidWidth = nVidVerWidth;
|
||||
nVidHeight = nVidVerHeight;
|
||||
nVidHeight = nVidVerHeight;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1721,7 +1721,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
POST_INITIALISE_MESSAGE;
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
case MENU_AUTOSWITCHFULL:
|
||||
bVidAutoSwitchFull = !bVidAutoSwitchFull;
|
||||
break;
|
||||
|
@ -1780,7 +1780,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
POST_INITIALISE_MESSAGE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_MONITORAUTOCHECK:
|
||||
bMonitorAutoCheck = !bMonitorAutoCheck;
|
||||
if (bMonitorAutoCheck) MonitorAutoCheck();
|
||||
|
@ -1816,7 +1816,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
case MENU_FORCE60HZ:
|
||||
bForce60Hz = !bForce60Hz;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_VIDEOVSYNC:
|
||||
bVidVSync = !bVidVSync;
|
||||
if (bVidVSync && bVidDWMSync)
|
||||
|
@ -1834,12 +1834,12 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
AudSelect(0);
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_AUD_PLUGIN_2:
|
||||
AudSelect(1);
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DSOUND_NOSOUND:
|
||||
if (!bDrvOkay) {
|
||||
nAudSampleRate[0] = 0;
|
||||
|
@ -1870,7 +1870,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
POST_INITIALISE_MESSAGE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_XAUDIO_NOSOUND:
|
||||
if (!bDrvOkay) {
|
||||
nAudSampleRate[1] = 0;
|
||||
|
@ -1935,11 +1935,11 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
case MENU_DSOUND_BASS:
|
||||
nAudDSPModule[0] = !nAudDSPModule[0];
|
||||
break;
|
||||
|
||||
|
||||
case MENU_XAUDIO_BASS:
|
||||
nAudDSPModule[1] ^= 1;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_XAUDIO_REVERB:
|
||||
nAudDSPModule[1] ^= 2;
|
||||
break;
|
||||
|
@ -1972,7 +1972,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bModelessMenu = !bModelessMenu;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_NOCHANGENUMLOCK:
|
||||
bNoChangeNumLock = !bNoChangeNumLock;
|
||||
break;
|
||||
|
@ -1982,7 +1982,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
DisableHighResolutionTiming(); // disable if active
|
||||
EnableHighResolutionTiming(); // use new setting.
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CREATEDIRS:
|
||||
bAlwaysCreateSupportFolders = !bAlwaysCreateSupportFolders;
|
||||
break;
|
||||
|
@ -1994,7 +1994,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
case MENU_SAVEHISCORES:
|
||||
EnableHiscores = !EnableHiscores;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_USEBLEND:
|
||||
bBurnUseBlend = !bBurnUseBlend;
|
||||
break;
|
||||
|
@ -2002,7 +2002,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
case MENU_GEARSHIFT:
|
||||
BurnShiftEnabled = !BurnShiftEnabled;
|
||||
break;
|
||||
|
||||
|
||||
#ifdef INCLUDE_AVI_RECORDING
|
||||
case MENU_AVI1X:
|
||||
nAvi3x = 1;
|
||||
|
@ -2016,27 +2016,27 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nAvi3x = 3;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
case MENU_ROMDIRS:
|
||||
RomsDirCreate(hScrnWnd);
|
||||
break;
|
||||
|
||||
|
||||
case MENU_SUPPORTDIRS:
|
||||
SupportDirCreate(hScrnWnd);
|
||||
break;
|
||||
|
||||
case MENU_SELECTPLACEHOLDER:
|
||||
|
||||
case MENU_SELECTPLACEHOLDER:
|
||||
if (UseDialogs()) {
|
||||
SelectPlaceHolder();
|
||||
POST_INITIALISE_MESSAGE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DISABLEPLACEHOLDER:
|
||||
ResetPlaceHolder();
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_LANGUAGE_SELECT:
|
||||
if (UseDialogs()) {
|
||||
FBALocaliseLoadTemplate();
|
||||
|
@ -2058,7 +2058,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
LocaliseDownloadCreate(hScrnWnd);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_LANGUAGE_GL_SELECT:
|
||||
if (UseDialogs()) {
|
||||
FBALocaliseGamelistLoadTemplate();
|
||||
|
@ -2080,7 +2080,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
// unload icons
|
||||
UnloadDrvIcons();
|
||||
bIconsLoaded = 0;
|
||||
}
|
||||
}
|
||||
if(bEnableIcons && !bIconsLoaded) {
|
||||
// load icons
|
||||
LoadDrvIcons();
|
||||
|
@ -2185,31 +2185,31 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nAppThreadPriority = THREAD_PRIORITY_LOWEST;
|
||||
SetThreadPriority(GetCurrentThread(), nAppThreadPriority);
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_ARCADE_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_MD_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_MEGADRIVE_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_PCE_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_PCENGINE_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_TG16_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_TG16_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_SGX_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_SGX_ONLY);
|
||||
|
@ -2227,13 +2227,13 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
CreateDatfileWindows(DAT_COLECO_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_SMS_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_MASTERSYSTEM_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_GG_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_GAMEGEAR_ONLY);
|
||||
|
@ -2245,13 +2245,13 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
CreateDatfileWindows(DAT_MSX_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_XML_SPECTRUM_ONLY:
|
||||
if (UseDialogs()) {
|
||||
CreateDatfileWindows(DAT_SPECTRUM_ONLY);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CLRMAME_PRO_ALL_DATS:
|
||||
if (UseDialogs()) {
|
||||
CreateAllDatfilesWindows();
|
||||
|
@ -2270,7 +2270,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
DebugCreate();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_PALETTEVIEWER: {
|
||||
AudBlankSound();
|
||||
InputSetCooperativeLevel(false, bAlwaysProcessKeyboardInput);
|
||||
|
@ -2306,14 +2306,14 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
SFactdCreate();
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_START: {
|
||||
CheatSearchStart();
|
||||
|
||||
|
||||
TCHAR szText[100];
|
||||
_stprintf(szText, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_NEW, true));
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, szText, 0xFFBFBF);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_NOCHANGE, MF_ENABLED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_CHANGE, MF_ENABLED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_DECREASE, MF_ENABLED | MF_BYCOMMAND);
|
||||
|
@ -2322,14 +2322,14 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_EXIT, MF_ENABLED | MF_BYCOMMAND);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_NOCHANGE: {
|
||||
TCHAR tmpmsg[256];
|
||||
unsigned int nValues = CheatSearchValueNoChange();
|
||||
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_ADD_MATCH, true), nValues);
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, tmpmsg, 0xFFBFBF);
|
||||
|
||||
|
||||
if (nValues <= CHEATSEARCH_SHOWRESULTS) {
|
||||
for (unsigned int i = 0; i < nValues; i++) {
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_RESULTS, true), CheatSearchShowResultAddresses[i], CheatSearchShowResultValues[i]);
|
||||
|
@ -2338,14 +2338,14 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_CHANGE: {
|
||||
TCHAR tmpmsg[256];
|
||||
unsigned int nValues = CheatSearchValueChange();
|
||||
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_ADD_MATCH, true), nValues);
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, tmpmsg, 0xFFBFBF);
|
||||
|
||||
|
||||
if (nValues <= CHEATSEARCH_SHOWRESULTS) {
|
||||
for (unsigned int i = 0; i < nValues; i++) {
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_RESULTS, true), CheatSearchShowResultAddresses[i], CheatSearchShowResultValues[i]);
|
||||
|
@ -2354,14 +2354,14 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_DECREASE: {
|
||||
TCHAR tmpmsg[256];
|
||||
unsigned int nValues = CheatSearchValueDecreased();
|
||||
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_ADD_MATCH, true), nValues);
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, tmpmsg, 0xFFBFBF);
|
||||
|
||||
|
||||
if (nValues <= CHEATSEARCH_SHOWRESULTS) {
|
||||
for (unsigned int i = 0; i < nValues; i++) {
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_RESULTS, true), CheatSearchShowResultAddresses[i], CheatSearchShowResultValues[i]);
|
||||
|
@ -2370,7 +2370,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_INCREASE: {
|
||||
TCHAR tmpmsg[256];
|
||||
|
||||
|
@ -2378,7 +2378,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_ADD_MATCH, true), nValues);
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, tmpmsg, 0xFFBFBF);
|
||||
|
||||
|
||||
if (nValues <= CHEATSEARCH_SHOWRESULTS) {
|
||||
for (unsigned int i = 0; i < nValues; i++) {
|
||||
_stprintf(tmpmsg, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_RESULTS, true), CheatSearchShowResultAddresses[i], CheatSearchShowResultValues[i]);
|
||||
|
@ -2387,19 +2387,19 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_DUMPFILE: {
|
||||
CheatSearchDumptoFile();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_CHEATSEARCH_EXIT: {
|
||||
CheatSearchExit();
|
||||
|
||||
|
||||
TCHAR szText[100];
|
||||
_stprintf(szText, FBALoadStringEx(hAppInst, IDS_CHEAT_SEARCH_EXIT, true));
|
||||
VidSAddChatMsg(NULL, 0xFFFFFF, szText, 0xFFBFBF);
|
||||
|
||||
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_NOCHANGE, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_CHANGE, MF_GRAYED | MF_BYCOMMAND);
|
||||
EnableMenuItem(hMenu, MENU_CHEATSEARCH_DECREASE, MF_GRAYED | MF_BYCOMMAND);
|
||||
|
@ -2460,7 +2460,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case MENU_WHATSNEW: {
|
||||
if (!nVidFullscreen) {
|
||||
FILE* fp = _tfopen(_T("whatsnew.html"), _T("r"));
|
||||
|
@ -2512,7 +2512,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidScanRotate = !bVidScanRotate;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_FORCE_FLIP:
|
||||
bVidForceFlip = !bVidForceFlip;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
|
@ -2930,12 +2930,12 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidDX9Bilinear = 0;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DX9_ALT_LINEAR:
|
||||
bVidDX9Bilinear = 1;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DX9_ALT_SOFT_STRETCH:
|
||||
case MENU_DX9_ALT_SOFT_SCALE2X:
|
||||
case MENU_DX9_ALT_SOFT_SCALE3X:
|
||||
|
@ -2980,7 +2980,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
nVidBlitterOpt[nVidSelect] ^= 0x0100;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DX9_ALT_HARDWAREVERTEX:
|
||||
bVidHardwareVertex = !bVidHardwareVertex;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
|
@ -2990,7 +2990,7 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
|
|||
bVidMotionBlur = !bVidMotionBlur;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
break;
|
||||
|
||||
|
||||
case MENU_DX9_ALT_FORCE_16BIT:
|
||||
bVidForce16bitDx9Alt = !bVidForce16bitDx9Alt;
|
||||
POST_INITIALISE_MESSAGE;
|
||||
|
@ -3051,7 +3051,7 @@ static void OnSize(HWND, UINT state, int cx, int cy)
|
|||
bool bSizeChanged = false;
|
||||
|
||||
MoveWindow(hRebar, 0, 0, cx, nMenuHeight, TRUE);
|
||||
|
||||
|
||||
if (hwndChat) {
|
||||
MoveWindow(hwndChat, 0, cy - 32, cx, 32, FALSE);
|
||||
}
|
||||
|
@ -3068,7 +3068,7 @@ static void OnSize(HWND, UINT state, int cx, int cy)
|
|||
}
|
||||
bMaximised = false;
|
||||
}
|
||||
|
||||
|
||||
if (bSizeChanged) {
|
||||
RefreshWindow(true);
|
||||
} else {
|
||||
|
@ -3096,7 +3096,7 @@ static void OnExitSizeMove(HWND)
|
|||
if (rect.right != nPrevWidth || rect.bottom != nPrevHeight) {
|
||||
RefreshWindow(true);
|
||||
}
|
||||
|
||||
|
||||
GetWindowRect(hScrnWnd, &rect);
|
||||
nWindowPosX = rect.left;
|
||||
nWindowPosY = rect.top;
|
||||
|
@ -3240,7 +3240,7 @@ int ScrnSize()
|
|||
// Find out how much space is taken up by the borders
|
||||
ew = GetSystemMetrics(SM_CXSIZEFRAME) << 1;
|
||||
eh = GetSystemMetrics(SM_CYSIZEFRAME) << 1;
|
||||
|
||||
|
||||
// Visual Studio 2012 (seems to have an issue with these, other reports on the web about it too
|
||||
#if defined _MSC_VER
|
||||
#if _MSC_VER >= 1700
|
||||
|
@ -3265,7 +3265,7 @@ int ScrnSize()
|
|||
w -= ew;
|
||||
h -= eh;
|
||||
}
|
||||
|
||||
|
||||
if ((bVidCorrectAspect || bVidFullStretch) && !(nVidSelect == 2 && (nVidBlitterOpt[2] & 0x0100) == 0)) {
|
||||
int ww = w;
|
||||
int hh = h;
|
||||
|
@ -3299,7 +3299,7 @@ int ScrnSize()
|
|||
h = nBmapHeight * nMaxSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!bDrvOkay) {
|
||||
if (w < 304) w = 304;
|
||||
if (h < 224) h = 224;
|
||||
|
@ -3377,7 +3377,7 @@ int ScrnInit()
|
|||
int nWindowStyles, nWindowExStyles;
|
||||
|
||||
ScrnExit();
|
||||
|
||||
|
||||
if (ScrnRegister() != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -85,10 +85,10 @@ BEGIN
|
|||
IDS_DISK_TEXT "Text Files"
|
||||
|
||||
IDS_DISK_SAVEREPORT "Save system information report"
|
||||
|
||||
|
||||
IDS_GAMELANG_LOAD "Select game list localisation template"
|
||||
IDS_GAMELANG_EXPORT "Create game list localisation template"
|
||||
|
||||
|
||||
IDS_ROMINFO_DIALOGTITLE "Rom Information"
|
||||
IDS_ROMINFO_ROMS "Rom Info"
|
||||
IDS_ROMINFO_SAMPLES "Sample Info"
|
||||
|
@ -104,7 +104,7 @@ BEGIN
|
|||
IDS_ROMINFO_SOUND "%s, Sound"
|
||||
IDS_ROMINFO_BIOS "%s, BIOS"
|
||||
IDS_ROMINFO_NODUMP "No Dump"
|
||||
|
||||
|
||||
IDS_SPATH_PREVIEW "Previews"
|
||||
IDS_SPATH_TITLES "Titles"
|
||||
IDS_SPATH_ICONS "Icons"
|
||||
|
@ -129,7 +129,7 @@ BEGIN
|
|||
IDS_SPATH_HISTORY "History.dat"
|
||||
IDS_SPATH_EEPROM "EEPROM Saves"
|
||||
IDS_SPATH_HDD "HDD Images"
|
||||
|
||||
|
||||
IDS_ROMPATH_1 "Path #1"
|
||||
IDS_ROMPATH_2 "Path #2"
|
||||
IDS_ROMPATH_3 "Path #3"
|
||||
|
@ -150,21 +150,21 @@ BEGIN
|
|||
IDS_ROMPATH_18 "Path #18"
|
||||
IDS_ROMPATH_19 "Path #19"
|
||||
IDS_ROMPATH_20 "Path #20"
|
||||
|
||||
|
||||
IDS_PRESET_SAVED "The preset file was saved to %s."
|
||||
|
||||
|
||||
IDS_LOCAL_GL_CREATE "Create gamelist localisation template"
|
||||
IDS_LOCAL_GL_SELECT "Select gamelist localisation template"
|
||||
IDS_LOCAL_GL_FILTER "FB Alpha gamelist localisation templates"
|
||||
|
||||
|
||||
IDS_CD_SELECT_IMAGE "Select CD-ROM image..."
|
||||
IDS_CD_SELECT_IMAGE_TITLE "Select CD-ROM image"
|
||||
IDS_CD_SELECT_FILTER "CD images"
|
||||
|
||||
|
||||
IDS_LOCAL_CREATE "Create localisation template"
|
||||
IDS_LOCAL_SELECT "Select localisation template"
|
||||
IDS_LOCAL_FILTER "FB Alpha localisation templates"
|
||||
|
||||
|
||||
IDS_SEL_FILTERS "Filters"
|
||||
IDS_SEL_HARDWARE "Hardware"
|
||||
IDS_SEL_CAVE "Cave"
|
||||
|
@ -208,7 +208,7 @@ BEGIN
|
|||
IDS_SEL_MIDWAY "Midway"
|
||||
IDS_SEL_CAPCOM_GRP "Capcom"
|
||||
IDS_SEL_SEGA_GRP "Sega"
|
||||
|
||||
|
||||
IDS_FAVORITES "Favorites"
|
||||
IDS_GENRE "Genre"
|
||||
IDS_GENRE_HORSHOOT "Shooter / Horizontal / Sh'mup"
|
||||
|
@ -249,13 +249,13 @@ BEGIN
|
|||
IDS_FAMILY_DONPACHI "DonPachi"
|
||||
IDS_FAMILY_MAHOU "Mahou Daisakusen"
|
||||
IDS_FAMILY_OTHER "Other"
|
||||
|
||||
|
||||
IDS_IPSMANAGER_TITLE "IPS Patch Manager"
|
||||
|
||||
|
||||
IDS_NGCD_DIAG_TITLE "%s%sNeo Geo CDZ%sSelect Game"
|
||||
IDS_NGCD_TITLE "Title"
|
||||
IDS_NGCD_NGCDID "NGCD-ID"
|
||||
|
||||
|
||||
IDS_MENU_0 "&Arcade"
|
||||
IDS_MENU_1 "&Other..."
|
||||
IDS_MENU_2 "&Other Gamma value..."
|
||||
|
@ -263,17 +263,17 @@ BEGIN
|
|||
IDS_MENU_4 "Load state from active slot (no %d)\tF9"
|
||||
IDS_MENU_5 "Save state to active slot (no %d)\tF10"
|
||||
IDS_MENU_6 "no game selected"
|
||||
|
||||
|
||||
IDS_NUMDIAL_NUM_FRAMES "Number of Frames"
|
||||
IDS_NUMDIAL_FILTER_SHARP "Select desired filter sharpness"
|
||||
|
||||
|
||||
IDS_SCANNING_ROMS "Scanning ROMs..."
|
||||
|
||||
|
||||
IDS_CHEAT_SEARCH_NEW "New cheat search started"
|
||||
IDS_CHEAT_SEARCH_ADD_MATCH "%i Addresses Matched"
|
||||
IDS_CHEAT_SEARCH_RESULTS "Address %08X Value %02X"
|
||||
IDS_CHEAT_SEARCH_EXIT "Cheat search exited"
|
||||
|
||||
|
||||
IDS_LANG_ENGLISH_US "English (US)"
|
||||
IDS_LANG_SIMP_CHINESE "Simplified Chinese"
|
||||
IDS_LANG_TRAD_CHINESE "Traditional Chinese"
|
||||
|
@ -286,7 +286,7 @@ BEGIN
|
|||
IDS_LANG_PORTUGUESE "Portuguese"
|
||||
IDS_LANG_POLISH "Polish"
|
||||
IDS_LANG_HUNGARIAN "Hungarian"
|
||||
|
||||
|
||||
IDS_GAMEINFO_DIALOGTITLE "Game Information"
|
||||
IDS_GAMEINFO_INGAME "In Game"
|
||||
IDS_GAMEINFO_TITLE "Title"
|
||||
|
@ -305,9 +305,9 @@ BEGIN
|
|||
IDS_GAMEINFO_HISTORY "History"
|
||||
IDS_GAMEINFO_SAMPLES "Sample Info"
|
||||
IDS_GAMEINFO_HDD "HDD Info"
|
||||
|
||||
|
||||
IDS_PLACEHOLDER_LOAD "Select Skin"
|
||||
|
||||
|
||||
IDS_CLONE_OF " (Clone of %s"
|
||||
IDS_ROMS_FROM_1 ", uses ROMs from %s"
|
||||
IDS_ROMS_FROM_2 "%suses ROMs from %s"
|
||||
|
@ -368,13 +368,13 @@ BEGIN
|
|||
IDS_ERR_DISK_UNAVAIL " is for an unavailable game."
|
||||
IDS_ERR_DISK_TOONEW " does not work with this version of %s."
|
||||
IDS_ERR_DISK_TOOOLD " requires a more recent version of %s, please upgrade."
|
||||
|
||||
IDS_ERR_NO_NETPLAYDLL "Error finding 'kailleraclient.dll'."
|
||||
IDS_ERR_NO_DRIVER_SELECTED "No driver has been selected from the list."
|
||||
|
||||
IDS_ERR_NO_NETPLAYDLL "Error finding 'kailleraclient.dll'."
|
||||
IDS_ERR_NO_DRIVER_SELECTED "No driver has been selected from the list."
|
||||
IDS_ERR_NO_DRIVER_SEL_SLOT1 "No driver has been selected for slot 1."
|
||||
IDS_ERR_NON_WORKING "This game isn't working. Load it anyway?"
|
||||
IDS_ERR_CDEMU_INI_FAIL "Couldn't initialise CD emulation."
|
||||
|
||||
|
||||
IDS_ERR_LOCAL_FAIL_CONNECT "Failed to connect to Internet"
|
||||
IDS_ERR_LOCAL_FAIL_OPEN_URL "Failed to access FB Alpha website"
|
||||
END
|
||||
|
|
|
@ -43,7 +43,7 @@ static void IconsDirPathChanged() {
|
|||
// load icons
|
||||
LoadDrvIcons();
|
||||
bIconsLoaded = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
|
@ -80,18 +80,18 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
// Setup the tabs
|
||||
hTabControl = GetDlgItem(hDlg, IDC_SPATH_TAB);
|
||||
|
||||
TC_ITEM tcItem;
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
|
||||
UINT idsString[24] = { IDS_SPATH_PREVIEW, IDS_SPATH_TITLES, IDS_SPATH_ICONS, IDS_SPATH_CHEATS, IDS_SPATH_HISCORE, IDS_SPATH_SAMPLES, IDS_SPATH_IPS, IDS_SPATH_NGCD_ISOS, IDS_SPATH_NGCD_COVERS, IDS_SPATH_BLEND, IDS_SPATH_SELECT, IDS_SPATH_VERSUS, IDS_SPATH_HOWTO, IDS_SPATH_SCORES, IDS_SPATH_BOSSES, IDS_SPATH_GAMEOVER, IDS_SPATH_FLYERS, IDS_SPATH_MARQUEES, IDS_SPATH_CONTROLS, IDS_SPATH_CABINETS, IDS_SPATH_PCBS, IDS_SPATH_HISTORY, IDS_SPATH_EEPROM, IDS_SPATH_HDD };
|
||||
|
||||
|
||||
for(int nIndex = 0; nIndex < 24; nIndex++) {
|
||||
tcItem.pszText = FBALoadStringEx(hAppInst, idsString[nIndex], true);
|
||||
TabCtrl_InsertItem(hTabControl, nIndex, &tcItem);
|
||||
}
|
||||
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
|
||||
|
||||
// hide all controls excluding the selected controls
|
||||
for(int x = 0; x < 24; x++) {
|
||||
if(x != TabPage) {
|
||||
|
@ -106,7 +106,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
|
||||
WndInMid(hDlg, hParent);
|
||||
SetFocus(hDlg); // Enable Esc=close
|
||||
|
||||
|
||||
if (nInitTabSelect) {
|
||||
SendMessage(hTabControl, TCM_SETCURSEL, nInitTabSelect, 0);
|
||||
// hide all controls excluding the selected controls
|
||||
|
@ -120,7 +120,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
if (pNmHdr->code == TCN_SELCHANGE) {
|
||||
|
||||
int TabPage = TabCtrl_GetCurSel(hTabControl);
|
||||
|
||||
|
||||
// hide all controls excluding the selected controls
|
||||
for(int x = 0; x < 24; x++) {
|
||||
if(x != TabPage) {
|
||||
|
@ -143,7 +143,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
// Show the proper controls
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_SUPPORTDIR_BR1 + TabPage), SW_SHOW); // browse buttons
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_SUPPORTDIR_EDIT1 + TabPage), SW_SHOW); // edit controls
|
||||
|
||||
|
||||
UpdateWindow(hDlg);
|
||||
|
||||
return FALSE;
|
||||
|
@ -156,7 +156,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
BROWSEINFO bInfo;
|
||||
ITEMIDLIST* pItemIDList = NULL;
|
||||
TCHAR buffer[MAX_PATH];
|
||||
|
||||
|
||||
if (LOWORD(wParam) == IDOK) {
|
||||
GetDlgItemText(hDlg, IDC_SUPPORTDIR_EDIT1, szAppPreviewsPath, sizeof(szAppPreviewsPath));
|
||||
GetDlgItemText(hDlg, IDC_SUPPORTDIR_EDIT2, szAppTitlesPath, sizeof(szAppTitlesPath));
|
||||
|
@ -195,7 +195,7 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SHGetMalloc(&pMalloc);
|
||||
|
||||
memset(&bInfo, 0, sizeof(bInfo));
|
||||
|
@ -220,10 +220,10 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
pMalloc->Free(pItemIDList);
|
||||
}
|
||||
pMalloc->Release();
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case WM_CLOSE: {
|
||||
EndDialog(hDlg, 0);
|
||||
// If Icons directory path has been changed do the proper action
|
||||
|
@ -240,19 +240,19 @@ static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lP
|
|||
int SupportDirCreate(HWND hParentWND)
|
||||
{
|
||||
hParent = hParentWND;
|
||||
|
||||
|
||||
_stprintf(szCheckIconsPath, szAppIconsPath);
|
||||
|
||||
|
||||
return FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_SUPPORTDIR), hParentWND, (DLGPROC)DefInpProc);
|
||||
}
|
||||
|
||||
int SupportDirCreateTab(int nTab, HWND hParentWND)
|
||||
{
|
||||
nInitTabSelect = nTab - IDC_SUPPORTDIR_EDIT1;
|
||||
|
||||
|
||||
hParent = hParentWND;
|
||||
|
||||
|
||||
_stprintf(szCheckIconsPath, szAppIconsPath);
|
||||
|
||||
|
||||
return FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_SUPPORTDIR), hParentWND, (DLGPROC)DefInpProc);
|
||||
}
|
||||
|
|
|
@ -160,9 +160,9 @@ int PrintOSInfo()
|
|||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
GetVersionEx((OSVERSIONINFO*)&osvi);
|
||||
}
|
||||
|
||||
|
||||
// bprintf(PRINT_NORMAL, _T("%i, %i\n"), osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||
|
||||
|
||||
AddText(_T("OS: "));
|
||||
{
|
||||
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
||||
|
@ -261,7 +261,7 @@ int PrintOSInfo()
|
|||
int PrintCPUInfo()
|
||||
{
|
||||
AddText(_T("CPU: "));
|
||||
|
||||
|
||||
char CPUBrandStringFinal[0x40] = { 0 };
|
||||
|
||||
#if defined _MSC_VER
|
||||
|
@ -289,12 +289,12 @@ int PrintCPUInfo()
|
|||
memcpy(CPUBrandString + 32, CPUInfo, sizeof(CPUInfo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// trim the leading white space
|
||||
int nCheckForSpace = 1;
|
||||
for (i = 0; CPUBrandString[i] != '\0'; i++) {
|
||||
if (!isspace(CPUBrandString[i])) nCheckForSpace = 0;
|
||||
|
||||
|
||||
if (nCheckForSpace) {
|
||||
if (!isspace(CPUBrandString[i])) {
|
||||
CPUBrandStringFinal[j++] = CPUBrandString[i];
|
||||
|
|
|
@ -22,28 +22,28 @@ static _7z_file* _7ZipFile = NULL;
|
|||
INT32 ZipOpen(char* szZip)
|
||||
{
|
||||
nFileType = ZIPFN_FILETYPE_NONE;
|
||||
|
||||
|
||||
if (szZip == NULL) return 1;
|
||||
|
||||
|
||||
char szFileName[MAX_PATH];
|
||||
|
||||
|
||||
sprintf(szFileName, "%s.zip", szZip);
|
||||
Zip = unzOpen(szFileName);
|
||||
if (Zip != NULL) {
|
||||
nFileType = ZIPFN_FILETYPE_ZIP;
|
||||
unzGoToFirstFile(Zip);
|
||||
nCurrFile = 0;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
sprintf(szFileName, "%s.7z", szZip);
|
||||
_7z_error _7zerr = _7z_file_open(szFileName, &_7ZipFile);
|
||||
if (_7zerr == _7ZERR_NONE) {
|
||||
nFileType = ZIPFN_FILETYPE_7ZIP;
|
||||
nCurrFile = 0;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -68,9 +68,9 @@ INT32 ZipClose()
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
nFileType = ZIPFN_FILETYPE_NONE;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -79,15 +79,15 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
|
|||
{
|
||||
if (nFileType == ZIPFN_FILETYPE_ZIP && Zip == NULL) return 1;
|
||||
if (pList == NULL) return 1;
|
||||
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP && _7ZipFile == NULL) return 1;
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP && _7ZipFile == NULL) return 1;
|
||||
#endif
|
||||
|
||||
|
||||
if (nFileType == ZIPFN_FILETYPE_ZIP) {
|
||||
unz_global_info ZipGlobalInfo;
|
||||
memset(&ZipGlobalInfo, 0, sizeof(ZipGlobalInfo));
|
||||
|
||||
|
||||
unzGetGlobalInfo(Zip, &ZipGlobalInfo);
|
||||
INT32 nListLen = ZipGlobalInfo.number_entry;
|
||||
|
||||
|
@ -131,19 +131,19 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
|
|||
unzGoToFirstFile(Zip);
|
||||
nCurrFile = 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP) {
|
||||
UInt16 *temp = NULL;
|
||||
size_t tempSize = 0;
|
||||
|
||||
|
||||
INT32 nListLen = _7ZipFile->db.NumFiles;
|
||||
|
||||
// Make an array of File Entries
|
||||
struct ZipEntry* List = (struct ZipEntry *)malloc(nListLen * sizeof(struct ZipEntry));
|
||||
if (List == NULL) return 1;
|
||||
memset(List, 0, nListLen * sizeof(struct ZipEntry));
|
||||
|
||||
|
||||
for (UINT32 i = 0; i < _7ZipFile->db.NumFiles; i++) {
|
||||
size_t len = SzArEx_GetFileNameUtf16(&_7ZipFile->db, i, NULL);
|
||||
|
||||
|
@ -160,39 +160,39 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
|
|||
return 1; // memory error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UINT64 size = SzArEx_GetFileSize(&_7ZipFile->db, i);
|
||||
UINT32 crc = _7ZipFile->db.CRCs.Vals[i];
|
||||
|
||||
|
||||
SzArEx_GetFileNameUtf16(&_7ZipFile->db, i, temp);
|
||||
|
||||
|
||||
// convert filename to char
|
||||
char *szFileName = NULL;
|
||||
szFileName = (char*)malloc(len * 2 * sizeof(char*));
|
||||
if (szFileName == NULL) continue;
|
||||
|
||||
|
||||
for (UINT32 j = 0; j < len; j++) {
|
||||
szFileName[j + 0] = temp[j] & 0xff;
|
||||
szFileName[j + 1] = temp[j] >> 8;
|
||||
}
|
||||
|
||||
|
||||
List[nCurrFile].szName = szFileName;
|
||||
List[nCurrFile].nLen = size;
|
||||
List[nCurrFile].nCrc = crc;
|
||||
|
||||
|
||||
nCurrFile++;
|
||||
}
|
||||
|
||||
|
||||
// return the file list
|
||||
*pList = List;
|
||||
if (pnListCount != NULL) *pnListCount = nListLen;
|
||||
|
||||
|
||||
nCurrFile = 0;
|
||||
|
||||
|
||||
SZipFree(NULL, temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -201,11 +201,11 @@ INT32 ZipLoadFile(UINT8* Dest, INT32 nLen, INT32* pnWrote, INT32 nEntry)
|
|||
if (nFileType == ZIPFN_FILETYPE_ZIP && Zip == NULL) return 1;
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP && _7ZipFile == NULL) return 1;
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP && _7ZipFile == NULL) return 1;
|
||||
#endif
|
||||
|
||||
INT32 nRet = 0;
|
||||
|
||||
|
||||
if (nFileType == ZIPFN_FILETYPE_ZIP) {
|
||||
if (nEntry < nCurrFile)
|
||||
{
|
||||
|
@ -234,20 +234,20 @@ INT32 ZipLoadFile(UINT8* Dest, INT32 nLen, INT32* pnWrote, INT32 nEntry)
|
|||
if (nRet == UNZ_CRCERROR) return 2;
|
||||
if (nRet != UNZ_OK) return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP) {
|
||||
_7ZipFile->curr_file_idx = nEntry;
|
||||
UINT32 nWrote = 0;
|
||||
|
||||
|
||||
UINT32 crc = _7ZipFile->db.CRCs.Vals[nEntry];
|
||||
|
||||
|
||||
_7z_error _7zerr = _7z_file_decompress(_7ZipFile, Dest, nLen, &nWrote);
|
||||
if (_7zerr != _7ZERR_NONE) return 1;
|
||||
|
||||
|
||||
// Return how many bytes were copied
|
||||
if (_7zerr == _7ZERR_NONE && pnWrote != NULL) *pnWrote = (INT32)nWrote;
|
||||
|
||||
|
||||
// use zlib crc32 module to calc crc of decompressed data, and check against 7z header
|
||||
UINT32 nCalcCrc = crc32(0, Dest, nWrote);
|
||||
if (nCalcCrc != crc) return 2;
|
||||
|
@ -348,22 +348,22 @@ INT32 __cdecl ZipLoadOneFile(char* arcName, const char* fileName, void** Dest, I
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef INCLUDE_7Z_SUPPORT
|
||||
if (nFileType == ZIPFN_FILETYPE_7ZIP) {
|
||||
UINT32 nWrote = 0;
|
||||
|
||||
|
||||
nCurrFile = _7z_search_crc_match(_7ZipFile, 0, fileName, strlen(fileName), 0, 1);
|
||||
if (nCurrFile == -1) {
|
||||
ZipClose();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
UINT64 size = SzArEx_GetFileSize(&_7ZipFile->db, nCurrFile);
|
||||
UINT32 crc = _7ZipFile->db.CRCs.Vals[nCurrFile];
|
||||
|
||||
|
||||
_7ZipFile->curr_file_idx = nCurrFile;
|
||||
|
||||
|
||||
if (*Dest == NULL) {
|
||||
*Dest = (UINT8*)malloc(size);
|
||||
if (!*Dest) {
|
||||
|
@ -371,17 +371,17 @@ INT32 __cdecl ZipLoadOneFile(char* arcName, const char* fileName, void** Dest, I
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_7z_error _7zerr = _7z_file_decompress(_7ZipFile, *Dest, size, &nWrote);
|
||||
if (_7zerr != _7ZERR_NONE) {
|
||||
ZipClose();
|
||||
if (*Dest) free(*Dest);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Return how many bytes were copied
|
||||
if (_7zerr == _7ZERR_NONE && pnWrote != NULL) *pnWrote = (INT32)nWrote;
|
||||
|
||||
|
||||
// use zlib crc32 module to calc crc of decompressed data, and check against 7z header
|
||||
UINT32 nCalcCrc = crc32(0, (const Bytef*)*Dest, nWrote);
|
||||
if (nCalcCrc != crc) {
|
||||
|
@ -389,11 +389,11 @@ INT32 __cdecl ZipLoadOneFile(char* arcName, const char* fileName, void** Dest, I
|
|||
if (*Dest) free(*Dest);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
ZipClose();
|
||||
|
||||
nCurrFile = 0;
|
||||
}
|
||||
|
||||
nCurrFile = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue