redundant code removed, let windows doing it on by own
This commit is contained in:
parent
c136fcfa1e
commit
f0a3f8cf21
|
@ -237,7 +237,10 @@ void LoadCDLogFile(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveCDLogFileAs(){
|
void SaveCDLogFileAs(){
|
||||||
|
//don't be stupid
|
||||||
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0All Files (*.*)\0*.*\0\0";
|
const char filter[]="Code Data Log File (*.CDL)\0*.cdl\0All Files (*.*)\0*.*\0\0";
|
||||||
|
//this feature not for select desired file extension for saved filename
|
||||||
|
//this feature only for filter file list only for desired file extension.
|
||||||
char nameo[2048];
|
char nameo[2048];
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
memset(&ofn,0,sizeof(ofn));
|
memset(&ofn,0,sizeof(ofn));
|
||||||
|
@ -246,16 +249,23 @@ 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());
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".cdl");
|
//don't be stupid,
|
||||||
|
ofn.lpstrDefExt = "cdl";
|
||||||
|
//do this automatically with system function, it is doing exactly what it written for
|
||||||
|
//why do you need to do this one more time? All we need here, filled extension in dialog window
|
||||||
|
//BEFORE saving it, there is no other options.
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt = "cdl";
|
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hCDLogger;
|
ofn.hwndOwner = hCDLogger;
|
||||||
|
//after that we will get complete file with ext added automatically from DefExt string
|
||||||
|
//change ext in Save Dialog and it will be saved
|
||||||
if(!GetSaveFileName(&ofn))return;
|
if(!GetSaveFileName(&ofn))return;
|
||||||
if (ofn.nFilterIndex == 1)
|
//there is bad if something is written AFTER i selectdesired file extension in Save Dialog
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".cdl");
|
//when I want NOT to have any extension, it will write me default one, that is stupid,
|
||||||
|
//in addition, this is silently forcing default extension to file, but user didn't know about it at all
|
||||||
|
|
||||||
|
//that's all what needed to work. I checked this and it works exactly what it should
|
||||||
strcpy(loadedcdfile,nameo);
|
strcpy(loadedcdfile,nameo);
|
||||||
SaveCDLogFile();
|
SaveCDLogFile();
|
||||||
return;
|
return;
|
||||||
|
@ -334,12 +344,10 @@ void SaveStrippedRom(){ //this is based off of iNesSave()
|
||||||
strcpy(sromfilename,GetRomName());
|
strcpy(sromfilename,GetRomName());
|
||||||
if (GameInfo->type==GIT_NSF) {
|
if (GameInfo->type==GIT_NSF) {
|
||||||
ofn.lpstrFilter=NSFfilter;
|
ofn.lpstrFilter=NSFfilter;
|
||||||
//ofn.lpstrDefExt = "nsf";
|
ofn.lpstrDefExt = "nsf";
|
||||||
AddExtensionIfMissing(sromfilename, sizeof(sromfilename), ".nsf");
|
|
||||||
} else {
|
} else {
|
||||||
ofn.lpstrFilter=NESfilter;
|
ofn.lpstrFilter=NESfilter;
|
||||||
//ofn.lpstrDefExt = "nes";
|
ofn.lpstrDefExt = "nes";
|
||||||
AddExtensionIfMissing(sromfilename, sizeof(sromfilename), ".nes");
|
|
||||||
}
|
}
|
||||||
ofn.lpstrFile=sromfilename;
|
ofn.lpstrFile=sromfilename;
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
|
@ -347,14 +355,6 @@ void SaveStrippedRom(){ //this is based off of iNesSave()
|
||||||
ofn.hwndOwner = hCDLogger;
|
ofn.hwndOwner = hCDLogger;
|
||||||
if(!GetSaveFileName(&ofn))return;
|
if(!GetSaveFileName(&ofn))return;
|
||||||
|
|
||||||
if (ofn.nFilterIndex == 1) {
|
|
||||||
if (GameInfo->type==GIT_NSF) {
|
|
||||||
AddExtensionIfMissing(sromfilename, sizeof(sromfilename), ".nsf");
|
|
||||||
} else {
|
|
||||||
AddExtensionIfMissing(sromfilename, sizeof(sromfilename), ".nes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fp = fopen(sromfilename,"wb");
|
fp = fopen(sromfilename,"wb");
|
||||||
|
|
||||||
if(GameInfo->type==GIT_NSF)
|
if(GameInfo->type==GIT_NSF)
|
||||||
|
|
|
@ -1565,9 +1565,8 @@ static void PresetExport(int preset)
|
||||||
ofn.lpstrTitle="Export Input Preset To...";
|
ofn.lpstrTitle="Export Input Preset To...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
nameo[0]=0; //No default filename
|
nameo[0]=0; //No default filename
|
||||||
//AddExtensionIfMissing(nameo, sizeof(nameo), ".pre");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="pre";
|
ofn.lpstrDefExt="pre";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
||||||
std::string initdir = FCEU_GetPath(FCEUMKF_INPUT).c_str();
|
std::string initdir = FCEU_GetPath(FCEUMKF_INPUT).c_str();
|
||||||
|
@ -1583,9 +1582,6 @@ static void PresetExport(int preset)
|
||||||
InputPresetDir[ofn.nFileOffset]=0;
|
InputPresetDir[ofn.nFileOffset]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".pre");
|
|
||||||
|
|
||||||
FILE *fp=FCEUD_UTF8fopen(nameo,"w");
|
FILE *fp=FCEUD_UTF8fopen(nameo,"w");
|
||||||
switch(preset)
|
switch(preset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,19 +299,13 @@ 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());
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".nes");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="nes";
|
ofn.lpstrDefExt="nes";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hMemView;
|
ofn.hwndOwner = hMemView;
|
||||||
if (GetSaveFileName(&ofn))
|
if (GetSaveFileName(&ofn))
|
||||||
{
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".nes");
|
|
||||||
|
|
||||||
iNesSaveAs(nameo);
|
iNesSaveAs(nameo);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int LoadTable(const char* nameo)
|
int LoadTable(const char* nameo)
|
||||||
|
@ -648,17 +642,13 @@ void dumpToFile(const char* buffer, unsigned int size)
|
||||||
ofn.lpstrTitle="Save to file ...";
|
ofn.lpstrTitle="Save to file ...";
|
||||||
ofn.lpstrFilter="Binary File (*.BIN)\0*.bin\0All Files (*.*)\0*.*\0\0";
|
ofn.lpstrFilter="Binary File (*.BIN)\0*.bin\0All Files (*.*)\0*.*\0\0";
|
||||||
strcpy(name,GetRomName());
|
strcpy(name,GetRomName());
|
||||||
AddExtensionIfMissing(name, sizeof(name), ".bin");
|
|
||||||
ofn.lpstrFile=name;
|
ofn.lpstrFile=name;
|
||||||
//ofn.lpstrDefExt="bin";
|
ofn.lpstrDefExt="bin";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY;
|
||||||
|
|
||||||
if (GetSaveFileName(&ofn))
|
if (GetSaveFileName(&ofn))
|
||||||
{
|
{
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(name, sizeof(name), ".bin");
|
|
||||||
|
|
||||||
FILE* memfile = fopen(name, "wb");
|
FILE* memfile = fopen(name, "wb");
|
||||||
|
|
||||||
if (!memfile || fwrite(buffer, 1, size, memfile) != size)
|
if (!memfile || fwrite(buffer, 1, size, memfile) != size)
|
||||||
|
|
|
@ -406,15 +406,14 @@ static void SaveMemWatch()
|
||||||
ofn.hInstance=fceu_hInstance;
|
ofn.hInstance=fceu_hInstance;
|
||||||
ofn.lpstrTitle="Save Memory Watch As...";
|
ofn.lpstrTitle="Save Memory Watch As...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
//ofn.lpstrDefExt="txt";
|
ofn.lpstrDefExt="txt";
|
||||||
char nameo[2048];
|
char nameo[2048];
|
||||||
if (!memwLastFilename[0])
|
if (!memwLastFilename[0])
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
else
|
else
|
||||||
strcpy(nameo,memwLastFilename);
|
strcpy(nameo,memwLastFilename);
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".txt");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="txt";
|
ofn.lpstrDefExt="txt";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
||||||
string initdir = FCEU_GetPath(FCEUMKF_MEMW);
|
string initdir = FCEU_GetPath(FCEUMKF_MEMW);
|
||||||
|
@ -432,9 +431,6 @@ static void SaveMemWatch()
|
||||||
MemWatchDir[ofn.nFileOffset]=0;
|
MemWatchDir[ofn.nFileOffset]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".txt");
|
|
||||||
|
|
||||||
strcpy(memwLastFilename,nameo);
|
strcpy(memwLastFilename,nameo);
|
||||||
|
|
||||||
SaveStrings();
|
SaveStrings();
|
||||||
|
|
|
@ -481,11 +481,6 @@ int Change_File_S(char *Dest, char *Dir, char *Titre, char *Filter, char *Ext, H
|
||||||
{
|
{
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
|
|
||||||
char *TempExt = 0;
|
|
||||||
TempExt=(char*)malloc(sizeof(Ext)+2);
|
|
||||||
strcpy(TempExt, ".");
|
|
||||||
strcat(TempExt, Ext);
|
|
||||||
|
|
||||||
SetCurrentDirectory(applicationPath);
|
SetCurrentDirectory(applicationPath);
|
||||||
|
|
||||||
if (!strcmp(Dest, ""))
|
if (!strcmp(Dest, ""))
|
||||||
|
@ -499,20 +494,16 @@ int Change_File_S(char *Dest, char *Dir, char *Titre, char *Filter, char *Ext, H
|
||||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||||
ofn.hwndOwner = hwnd;
|
ofn.hwndOwner = hwnd;
|
||||||
ofn.hInstance = hInst;
|
ofn.hInstance = hInst;
|
||||||
AddExtensionIfMissing(Dest, 1024, TempExt); //1024 checked manually
|
|
||||||
ofn.lpstrFile = Dest;
|
ofn.lpstrFile = Dest;
|
||||||
ofn.nMaxFile = 2047;
|
ofn.nMaxFile = 2047;
|
||||||
ofn.lpstrFilter = Filter;
|
ofn.lpstrFilter = Filter;
|
||||||
ofn.nFilterIndex = 1;
|
ofn.nFilterIndex = 1;
|
||||||
ofn.lpstrInitialDir = Dir;
|
ofn.lpstrInitialDir = Dir;
|
||||||
ofn.lpstrTitle = Titre;
|
ofn.lpstrTitle = Titre;
|
||||||
//ofn.lpstrDefExt = Ext;
|
ofn.lpstrDefExt = Ext;
|
||||||
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
|
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
|
||||||
|
|
||||||
if (GetSaveFileName(&ofn)) {
|
if (GetSaveFileName(&ofn)) {
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(Dest, 1024, TempExt); //1024 checked manually
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +516,6 @@ bool Save_Watches()
|
||||||
strcpy(Str_Tmp,slash ? slash+1 : gamefilename);
|
strcpy(Str_Tmp,slash ? slash+1 : gamefilename);
|
||||||
char* dot = strrchr(Str_Tmp, '.');
|
char* dot = strrchr(Str_Tmp, '.');
|
||||||
if(dot) *dot = 0;
|
if(dot) *dot = 0;
|
||||||
strcat(Str_Tmp,".wch");
|
|
||||||
if(Change_File_S(Str_Tmp, applicationPath, "Save Watches", "Watchlist (*.wch)\0*.wch\0All Files (*.*)\0*.*\0\0", "wch", RamWatchHWnd))
|
if(Change_File_S(Str_Tmp, applicationPath, "Save Watches", "Watchlist (*.wch)\0*.wch\0All Files (*.*)\0*.*\0\0", "wch", RamWatchHWnd))
|
||||||
{
|
{
|
||||||
FILE *WatchFile = fopen(Str_Tmp,"r+b");
|
FILE *WatchFile = fopen(Str_Tmp,"r+b");
|
||||||
|
|
|
@ -921,15 +921,11 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
|
||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
ofn.hwndOwner = hwndDlg;
|
ofn.hwndOwner = hwndDlg;
|
||||||
ofn.lpstrFilter = "FCEUX Movie File (*.fm2)\0*.fm2\0All Files (*.*)\0*.*\0\0";
|
ofn.lpstrFilter = "FCEUX Movie File (*.fm2)\0*.fm2\0All Files (*.*)\0*.*\0\0";
|
||||||
AddExtensionIfMissing(szChoice, sizeof(szChoice), ".fm2");
|
|
||||||
ofn.lpstrFile = szChoice;
|
ofn.lpstrFile = szChoice;
|
||||||
//ofn.lpstrDefExt = "fm2";
|
ofn.lpstrDefExt = "fm2";
|
||||||
ofn.nMaxFile = MAX_PATH;
|
ofn.nMaxFile = MAX_PATH;
|
||||||
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
||||||
if(GetSaveFileName(&ofn)) {
|
if(GetSaveFileName(&ofn)) {
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(szChoice, sizeof(szChoice), ".fm2");
|
|
||||||
|
|
||||||
UpdateRecordDialogPath(hwndDlg,szChoice);
|
UpdateRecordDialogPath(hwndDlg,szChoice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,21 +25,15 @@ void FCEUD_SaveStateAs()
|
||||||
ofn.lpstrTitle = "Save State As...";
|
ofn.lpstrTitle = "Save State As...";
|
||||||
ofn.lpstrFilter = filter;
|
ofn.lpstrFilter = filter;
|
||||||
strcpy(nameo,FCEU_MakeFName(FCEUMKF_STATE,CurrentState,0).c_str());
|
strcpy(nameo,FCEU_MakeFName(FCEUMKF_STATE,CurrentState,0).c_str());
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".fcs");
|
|
||||||
ofn.lpstrFile = nameo;
|
ofn.lpstrFile = nameo;
|
||||||
//ofn.lpstrDefExt = "fcs";
|
ofn.lpstrDefExt = "fcs";
|
||||||
std::string initdir = FCEU_GetPath(FCEUMKF_STATE);
|
std::string initdir = FCEU_GetPath(FCEUMKF_STATE);
|
||||||
ofn.lpstrInitialDir = initdir.c_str();
|
ofn.lpstrInitialDir = initdir.c_str();
|
||||||
ofn.nMaxFile = 256;
|
ofn.nMaxFile = 256;
|
||||||
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
|
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn))
|
if(GetSaveFileName(&ofn))
|
||||||
{
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".fcs");
|
|
||||||
|
|
||||||
FCEUI_SaveState(nameo);
|
FCEUI_SaveState(nameo);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -892,9 +892,8 @@ static void SaveProjectAs()
|
||||||
char nameo[2048]; //File name
|
char nameo[2048]; //File name
|
||||||
strcpy(nameo, GetRomName()); //For now, just use ROM name
|
strcpy(nameo, GetRomName()); //For now, just use ROM name
|
||||||
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".tas");
|
|
||||||
ofn.lpstrFile=nameo; //More parameters
|
ofn.lpstrFile=nameo; //More parameters
|
||||||
//ofn.lpstrDefExt="tas";
|
ofn.lpstrDefExt="tas";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
||||||
string initdir = FCEU_GetPath(FCEUMKF_MOVIE); //Initial directory
|
string initdir = FCEU_GetPath(FCEUMKF_MOVIE); //Initial directory
|
||||||
|
@ -902,9 +901,6 @@ static void SaveProjectAs()
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn)) //If it is a valid filename
|
if(GetSaveFileName(&ofn)) //If it is a valid filename
|
||||||
{
|
{
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".tas");
|
|
||||||
|
|
||||||
std::string tempstr = nameo; //Make a temporary string for filename
|
std::string tempstr = nameo; //Make a temporary string for filename
|
||||||
char drv[512], dir[512], name[512], ext[512]; //For getting the filename!
|
char drv[512], dir[512], name[512], ext[512]; //For getting the filename!
|
||||||
|
|
||||||
|
@ -948,17 +944,13 @@ static void Export()
|
||||||
ofn.hInstance=fceu_hInstance;
|
ofn.hInstance=fceu_hInstance;
|
||||||
ofn.lpstrTitle="Export TAS as...";
|
ofn.lpstrTitle="Export TAS as...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
AddExtensionIfMissing(fname, sizeof(fname), ".fm2");
|
|
||||||
ofn.lpstrFile=fname;
|
ofn.lpstrFile=fname;
|
||||||
//ofn.lpstrDefExt="fm2";
|
ofn.lpstrDefExt="fm2";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
std::string initdir = FCEU_GetPath(FCEUMKF_MOVIE);
|
std::string initdir = FCEU_GetPath(FCEUMKF_MOVIE);
|
||||||
ofn.lpstrInitialDir=initdir.c_str();
|
ofn.lpstrInitialDir=initdir.c_str();
|
||||||
if(GetSaveFileName(&ofn))
|
if(GetSaveFileName(&ofn))
|
||||||
{
|
{
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(fname, sizeof(fname), ".fm2");
|
|
||||||
|
|
||||||
fstream* osRecordingMovie = FCEUD_UTF8_fstream(fname, "wb");
|
fstream* osRecordingMovie = FCEUD_UTF8_fstream(fname, "wb");
|
||||||
currMovieData.dump(osRecordingMovie,false);
|
currMovieData.dump(osRecordingMovie,false);
|
||||||
delete osRecordingMovie;
|
delete osRecordingMovie;
|
||||||
|
|
|
@ -692,9 +692,8 @@ int TextHookerSaveTableFile(){
|
||||||
ofn.lpstrTitle="Load Table File...";
|
ofn.lpstrTitle="Load Table File...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".tht");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="tht";
|
ofn.lpstrDefExt="tht";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_EXTENSIONDIFFERENT;
|
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_EXTENSIONDIFFERENT;
|
||||||
ofn.hwndOwner = hCDLogger;
|
ofn.hwndOwner = hCDLogger;
|
||||||
|
@ -702,9 +701,6 @@ int TextHookerSaveTableFile(){
|
||||||
//get the file name or quit
|
//get the file name or quit
|
||||||
if(!GetSaveFileName(&ofn))return 0;
|
if(!GetSaveFileName(&ofn))return 0;
|
||||||
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".tht");
|
|
||||||
|
|
||||||
//open the file
|
//open the file
|
||||||
FP = fopen(nameo,"wb");
|
FP = fopen(nameo,"wb");
|
||||||
line = 0; //init the line counter
|
line = 0; //init the line counter
|
||||||
|
|
|
@ -593,7 +593,6 @@ void ShowLogDirDialog(void){
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="log";
|
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hTracer;
|
ofn.hwndOwner = hTracer;
|
||||||
|
|
|
@ -45,19 +45,13 @@ bool CreateSoundSave()
|
||||||
ofn.lpstrTitle="Log Sound As...";
|
ofn.lpstrTitle="Log Sound As...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,GetRomName());
|
strcpy(nameo,GetRomName());
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".wav");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="wav";
|
ofn.lpstrDefExt="wav";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn))
|
if(GetSaveFileName(&ofn))
|
||||||
{
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(nameo, sizeof(nameo), ".wav");
|
|
||||||
|
|
||||||
return FCEUI_BeginWaveRecord(nameo);
|
return FCEUI_BeginWaveRecord(nameo);
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2421,21 +2421,15 @@ void FCEUD_AviRecordTo(void)
|
||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
ofn.hwndOwner = hAppWnd;
|
ofn.hwndOwner = hAppWnd;
|
||||||
ofn.lpstrFilter = "AVI Files (*.avi)\0*.avi\0All Files (*.*)\0*.*\0\0";
|
ofn.lpstrFilter = "AVI Files (*.avi)\0*.avi\0All Files (*.*)\0*.*\0\0";
|
||||||
AddExtensionIfMissing(szChoice, sizeof(szChoice), ".avi");
|
|
||||||
ofn.lpstrFile = szChoice;
|
ofn.lpstrFile = szChoice;
|
||||||
//ofn.lpstrDefExt = "avi";
|
ofn.lpstrDefExt = "avi";
|
||||||
ofn.lpstrTitle = "Save AVI as";
|
ofn.lpstrTitle = "Save AVI as";
|
||||||
|
|
||||||
ofn.nMaxFile = MAX_PATH;
|
ofn.nMaxFile = MAX_PATH;
|
||||||
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
|
||||||
|
|
||||||
if(GetSaveFileName(&ofn))
|
if(GetSaveFileName(&ofn))
|
||||||
{
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(szChoice, sizeof(szChoice), ".avi");
|
|
||||||
|
|
||||||
FCEUI_AviBegin(szChoice);
|
FCEUI_AviBegin(szChoice);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Stop AVI recording
|
//Stop AVI recording
|
||||||
|
@ -2707,9 +2701,8 @@ void SaveMovieAs()
|
||||||
ofn.lpstrTitle="Save Movie as...";
|
ofn.lpstrTitle="Save Movie as...";
|
||||||
ofn.lpstrFilter=filter;
|
ofn.lpstrFilter=filter;
|
||||||
strcpy(nameo,curMovieFilename);
|
strcpy(nameo,curMovieFilename);
|
||||||
AddExtensionIfMissing(tempName, ".fm2");
|
|
||||||
ofn.lpstrFile=nameo;
|
ofn.lpstrFile=nameo;
|
||||||
//ofn.lpstrDefExt="fm2";
|
ofn.lpstrDefExt="fm2";
|
||||||
ofn.nMaxFile=256;
|
ofn.nMaxFile=256;
|
||||||
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
ofn.Flags=OFN_EXPLORER|OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
|
||||||
ofn.hwndOwner = hMemView;
|
ofn.hwndOwner = hMemView;
|
||||||
|
@ -2717,9 +2710,6 @@ void SaveMovieAs()
|
||||||
{
|
{
|
||||||
tempName = nameo;
|
tempName = nameo;
|
||||||
|
|
||||||
if (ofn.nFilterIndex == 1)
|
|
||||||
AddExtensionIfMissing(tempName, ".fm2");
|
|
||||||
|
|
||||||
FCEUI_CreateMovieFile(tempName);
|
FCEUI_CreateMovieFile(tempName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue