File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -564,10 +564,10 @@ void UpdateFlashItem(void)
564564 ofn.lpstrInitialDir = CapFilePath;
565565 ofn.lpstrTitle = " Set Flash Rom file" ;
566566
567- GetOpenFileName (&ofn);
568-
569- for ( unsigned int i= 0 ; i< strlen (filename); i++) {
570- if (filename[i] == ' \\ ' ) filename[i] = ' / ' ;
567+ if ( GetOpenFileName (&ofn)) {
568+ for ( unsigned int i= 0 ; i< strlen (filename); i++) {
569+ if (filename[i] == ' \\ ' ) filename[i] = ' / ' ;
570+ }
571571 }
572572
573573 strncpy (FlashFile[index],&filename[3 ],MAX_PATH);
@@ -630,10 +630,11 @@ bool LoadRom()
630630{
631631 char * RomName;
632632 RomName = FlashFile[CurrentBank];
633- _DLOG (" LoadRom bank %d file %s \n " ,CurrentBank,RomName);
634- if (* RomName == NULL ) {
635- // _DLOG("LoadRom loading default SDC-DOS\n");
633+ _DLOG (" LoadRom bank %d file '%s' \n " ,CurrentBank,RomName);
634+ if ((CurrentBank == 0 ) && ( strcmp ( RomName, " -empty- " ) == 0 ) ) {
635+ _DLOG (" LoadRom loading default SDC-DOS\n " );
636636 RomName = " SDC-DOS.ROM" ;
637+ strncpy (FlashFile[CurrentBank],RomName,MAX_PATH);
637638 }
638639
639640 int ch;
Original file line number Diff line number Diff line change 11// Uncomment to get console logging
2- #define USE_LOGGING
2+ // #define USE_LOGGING
33
44#include "../defines.h"
55#include "../logger.h"
You can’t perform that action at this time.
0 commit comments