mirror of https://github.com/snes9xgit/snes9x.git
win32: fix unicode file loading via command line
This commit is contained in:
parent
47ef0fca45
commit
ac60d9117e
|
@ -298,7 +298,7 @@ static bool try_save(const char *fname, ConfigFile &conf){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char rom_filename [MAX_PATH] = {0,};
|
static char rom_filename [MAX_PATH] = {0};
|
||||||
|
|
||||||
static bool S9xSaveConfigFile(ConfigFile &conf){
|
static bool S9xSaveConfigFile(ConfigFile &conf){
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ const char* WinParseCommandLineAndLoadConfigFile (char *line)
|
||||||
static char *parameters [MAX_PARAMETERS];
|
static char *parameters [MAX_PARAMETERS];
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
parameters [count++] = "Snes9X";
|
//parameters [count++] = "Snes9X";
|
||||||
|
|
||||||
while (count < MAX_PARAMETERS && *p)
|
while (count < MAX_PARAMETERS && *p)
|
||||||
{
|
{
|
||||||
|
|
|
@ -322,8 +322,6 @@ HINSTANCE g_hInst;
|
||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *rom_filename = NULL;
|
|
||||||
|
|
||||||
struct SJoypad Joypad[16] = {
|
struct SJoypad Joypad[16] = {
|
||||||
{
|
{
|
||||||
true, /* Joypad 1 enabled */
|
true, /* Joypad 1 enabled */
|
||||||
|
@ -3338,6 +3336,7 @@ int WINAPI WinMain(
|
||||||
LPSTR lpCmdLine,
|
LPSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
|
char cmdLine[MAX_PATH];
|
||||||
Settings.StopEmulation = TRUE;
|
Settings.StopEmulation = TRUE;
|
||||||
|
|
||||||
SetCurrentDirectory(S9xGetDirectoryT(DEFAULT_DIR));
|
SetCurrentDirectory(S9xGetDirectoryT(DEFAULT_DIR));
|
||||||
|
@ -3356,7 +3355,9 @@ int WINAPI WinMain(
|
||||||
|
|
||||||
ConfigFile::SetAlphaSort(false);
|
ConfigFile::SetAlphaSort(false);
|
||||||
ConfigFile::SetTimeSort(false);
|
ConfigFile::SetTimeSort(false);
|
||||||
rom_filename = WinParseCommandLineAndLoadConfigFile (lpCmdLine);
|
|
||||||
|
strcpy(cmdLine,_tToChar(GetCommandLine()));
|
||||||
|
const char *rom_filename = WinParseCommandLineAndLoadConfigFile (cmdLine);
|
||||||
WinSaveConfigFile ();
|
WinSaveConfigFile ();
|
||||||
WinLockConfigFile ();
|
WinLockConfigFile ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue