[Glide64] fix up rom name being sscii

This commit is contained in:
zilmar 2016-01-25 21:34:16 +11:00
parent 0f185260f4
commit 76a3db6568
4 changed files with 70 additions and 66 deletions

View File

@ -25,7 +25,7 @@
#include <stdlib.h>
#include "Ext_TxFilter.h"
extern "C" boolean txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, const wchar_t *path, const wchar_t *ident, dispInfoFuncExt callback);
extern "C" boolean txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, const wchar_t *path, const char *ident, dispInfoFuncExt callback);
extern "C" void txfilter_shutdown(void);
extern "C" boolean txfilter(unsigned char *src, int srcwidth, int srcheight, unsigned short srcformat, uint64 g64crc, GHQTexInfo *info);
extern "C" boolean txfilter_hirestex(uint64 g64crc, uint64 r_crc64, unsigned short *palette, GHQTexInfo *info);
@ -39,7 +39,7 @@ void ext_ghq_shutdown(void)
}
boolean ext_ghq_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize,
const wchar_t *path, const wchar_t *ident,
const wchar_t *path, const char *ident,
dispInfoFuncExt callback)
{
return txfilter_init(maxwidth, maxheight, maxbpp, options, cachesize, path, ident, callback);

View File

@ -160,7 +160,7 @@ struct GHQTexInfo {
* }
*/
#define INFO_BUF 4095
typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
typedef void(*dispInfoFuncExt)(const wchar_t *format, ...);
#ifndef TXFILTER_DLL
boolean ext_ghq_init(int maxwidth, /* maximum texture width supported by hardware */
@ -169,7 +169,7 @@ boolean ext_ghq_init(int maxwidth, /* maximum texture width supported by hardwar
int options, /* options */
int cachesize,/* cache textures to system memory */
const wchar_t *path, /* plugin directory. must be smaller than MAX_PATH */
const wchar_t *ident, /* name of ROM. must be no longer than 64 in character. */
const char *ident, /* name of ROM. must be no longer than 64 in character. */
dispInfoFuncExt callback /* callback function to display info */
);

View File

@ -1100,7 +1100,7 @@ int InitGfx()
options,
settings.ghq_cache_size * 1024 * 1024, // cache texture to system memory
stdstr(settings.texture_dir).ToUTF16().c_str(),
rdp.RomName.wchar_str(), // name of ROM. must be no longer than 256 characters
rdp.RomName, // name of ROM. must be no longer than 256 characters
DisplayLoadProgress);
}
}
@ -1731,15 +1731,16 @@ void CALL RomOpen(void)
// remove all trailing spaces
while (name[strlen(name) - 1] == ' ')
{
name[strlen(name) - 1] = 0;
}
wxString strRomName = wxString::FromAscii(name);
if (settings.ghq_use && strRomName != rdp.RomName)
if (settings.ghq_use && strcmp(rdp.RomName, name) != 0)
{
ext_ghq_shutdown();
settings.ghq_use = 0;
}
rdp.RomName = strRomName;
strcpy(rdp.RomName, name);
ReadSpecialSettings(name);
ClearCache();

View File

@ -55,8 +55,11 @@
extern CriticalSection * g_ProcessDListCS;
#endif
const int NumOfFormats = 3;
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] = { { "BMP", "bmp", wxBITMAP_TYPE_BMP }, { "PNG", "png", wxBITMAP_TYPE_PNG }, { "JPEG", "jpeg", wxBITMAP_TYPE_JPEG } };
const int NumOfFormats = 1;
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] =
{
{ "PNG", "png", rdpBITMAP_TYPE_PNG},
};
const char *ACmp[] = { "NONE", "THRESHOLD", "UNKNOWN", "DITHER" };