Added basic default extensions to a few save dialogs that were missing them. Addresses bug 2996917.
This commit is contained in:
parent
cbfd453bcd
commit
40eff5685b
|
@ -246,6 +246,7 @@ void SaveCDLogFileAs(){
|
||||||
ofn.lpstrTitle="Save Code Data Log File As...";
|
ofn.lpstrTitle="Save Code Data Log File As...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
|
strcat(nameo,".cdl");
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
|
@ -333,6 +334,12 @@ void SaveStrippedRom(){ //this is based off of iNesSave()
|
||||||
ofn.lpstrFilter=NESfilter;
|
ofn.lpstrFilter=NESfilter;
|
||||||
}
|
}
|
||||||
strcpy(sromfilename,GetRomName());
|
strcpy(sromfilename,GetRomName());
|
||||||
|
if (GameInfo->type==GIT_NSF) {
|
||||||
|
strcat(sromfilename,"_cdl.nsf");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
strcat(sromfilename,"_cdl.nes");
|
||||||
|
}
|
||||||
ofn.lpstrFile=sromfilename;
|
ofn.lpstrFile=sromfilename;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
|
|
|
@ -295,6 +295,7 @@ void SaveRomAs()
|
||||||
ofn.lpstrTitle="Save Nes ROM as...";
|
ofn.lpstrTitle="Save Nes ROM as...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
|
strcat(nameo,"_save.nes");
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
|
@ -632,7 +633,7 @@ int DeleteCheatCallB(char *name, uint32 a, uint8 v, int compare,int s,int type,
|
||||||
|
|
||||||
// ################################## Start of SP CODE ###########################
|
// ################################## Start of SP CODE ###########################
|
||||||
|
|
||||||
void dumpToFile(const char* buffer, unsigned int size)
|
void dumpToFile(const char* buffer, unsigned int size, char *nameappend)
|
||||||
{
|
{
|
||||||
char name[513] = {0};
|
char name[513] = {0};
|
||||||
|
|
||||||
|
@ -643,6 +644,7 @@ void dumpToFile(const char* buffer, unsigned int size)
|
||||||
ofn.lpstrTitle="Save to file ...";
|
ofn.lpstrTitle="Save to file ...";
|
||||||
ofn.lpstrFilter="All files (*.*)\0*.*\0";
|
ofn.lpstrFilter="All files (*.*)\0*.*\0";
|
||||||
strcpy(name,GetRomName());
|
strcpy(name,GetRomName());
|
||||||
|
strcat(name,nameappend);
|
||||||
ofn.lpstrFile=name;
|
ofn.lpstrFile=name;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY;
|
||||||
|
@ -1484,7 +1486,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i=0;i<sizeof(bar);i++) bar[i] = GetMem(i);
|
for (i=0;i<sizeof(bar);i++) bar[i] = GetMem(i);
|
||||||
|
|
||||||
dumpToFile(bar, sizeof(bar));
|
dumpToFile(bar, sizeof(bar),"_ram.bin");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case MENU_MV_FILE_DUMP_PPU:
|
case MENU_MV_FILE_DUMP_PPU:
|
||||||
|
@ -1499,7 +1501,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
else if(i < 0x3F00) bar[i] = vnapage[(i>>10)&0x3][i&0x3FF];
|
else if(i < 0x3F00) bar[i] = vnapage[(i>>10)&0x3][i&0x3FF];
|
||||||
else bar[i] = PALRAM[i&0x1F];
|
else bar[i] = PALRAM[i&0x1F];
|
||||||
}
|
}
|
||||||
dumpToFile(bar, sizeof(bar));
|
dumpToFile(bar, sizeof(bar),"_ppu.bin");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// ################################## End of SP CODE ###########################
|
// ################################## End of SP CODE ###########################
|
||||||
|
|
|
@ -592,6 +592,7 @@ void ShowLogDirDialog(void){
|
||||||
ofn.lpstrTitle="Log Trace As...";
|
ofn.lpstrTitle="Log Trace As...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
|
strcat(nameo,"_log.txt");
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
|
|
Loading…
Reference in New Issue