Further normalized all of the Open/Save dialog filters, and static_cast several annoying warnings into oblivion.
This commit is contained in:
parent
3862bf0827
commit
8c58b23e77
|
@ -275,7 +275,7 @@ INT_PTR CALLBACK DlgLuaScriptDialog(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
|||
ZeroMemory( (LPVOID)&ofn, sizeof(OPENFILENAME) );
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.hwndOwner = hAppWnd;
|
||||
ofn.lpstrFilter = "Lua scripts (*.lua)\0*.lua\0All files (*.*)\0*.*\0\0";
|
||||
ofn.lpstrFilter = "Lua scripts (*.lua)\0*.lua\0All Files (*.*)\0*.*\0\0";
|
||||
ofn.lpstrFile = szFileName;
|
||||
ofn.lpstrDefExt = "lua";
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
|
|
|
@ -371,7 +371,7 @@ int LoadTable(const char* nameo)
|
|||
|
||||
//should return -1, otherwise returns the line number it had the error on
|
||||
int LoadTableFile(){
|
||||
const char filter[]="Table Files (*.TBL)\0*.tbl\0All files (*.*)\0*.*\0\0";
|
||||
const char filter[]="Table Files (*.TBL)\0*.tbl\0All Files (*.*)\0*.*\0\0";
|
||||
char nameo[2048]; //todo: possibly no need for this? can lpstrfilter point to loadedcdfile instead?
|
||||
OPENFILENAME ofn;
|
||||
memset(&ofn,0,sizeof(ofn));
|
||||
|
|
|
@ -31,7 +31,7 @@ bool SetPalette(const char* nameo)
|
|||
**/
|
||||
int LoadPaletteFile()
|
||||
{
|
||||
const char filter[]="All usable files(*.pal)\0*.pal\0All files (*.*)\0*.*\0\0";
|
||||
const char filter[]="All usable files (*.pal)\0*.pal\0All Files (*.*)\0*.*\0\0";
|
||||
|
||||
bool success = false;
|
||||
char nameo[2048];
|
||||
|
|
|
@ -658,7 +658,7 @@ BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
|
|||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hwndDlg;
|
||||
ofn.lpstrFilter = "FCEUX Movie Files (*.fm2)\0*.fm2\0Archive files(*.zip,*.rar,*.7z)\0*.zip;*.rar;*.7z\0All files(*.*)\0*.*\0\0";
|
||||
ofn.lpstrFilter = "FCEUX Movie Files (*.fm2)\0*.fm2\0Archive Files (*.zip,*.rar,*.7z)\0*.zip;*.rar;*.7z\0All Files (*.*)\0*.*\0\0";
|
||||
ofn.lpstrFile = szFile;
|
||||
ofn.nMaxFile = sizeof(szFile);
|
||||
ofn.lpstrInitialDir = pn;
|
||||
|
@ -920,7 +920,7 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
|
|||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
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";
|
||||
ofn.lpstrFile = szChoice;
|
||||
//ofn.lpstrDefExt = "fm2";
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
|
|
|
@ -163,7 +163,7 @@ void UpdateTasEdit()
|
|||
}
|
||||
|
||||
static int old_movie_readonly=-1;
|
||||
if (old_movie_readonly != movie_readonly)
|
||||
if ((!old_movie_readonly) == movie_readonly) //Originally (old_movie_readonly = movie_readonly)
|
||||
{
|
||||
old_movie_readonly = movie_readonly;
|
||||
if (movie_readonly)
|
||||
|
@ -267,7 +267,7 @@ bool JumpToFrame(int index)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (index<currMovieData.records.size() &&
|
||||
if (static_cast<unsigned int>(index)<currMovieData.records.size() &&
|
||||
!currMovieData.records[index].savestate.empty() &&
|
||||
MovieData::loadSavestateFrom(&currMovieData.records[index].savestate))
|
||||
{
|
||||
|
@ -281,7 +281,7 @@ bool JumpToFrame(int index)
|
|||
FCEUI_ToggleEmulationPause();
|
||||
|
||||
int i = index>0? index-1:0;
|
||||
if (i>=currMovieData.records.size())
|
||||
if (static_cast<unsigned int>(i)>=currMovieData.records.size())
|
||||
i=currMovieData.records.size()-1;
|
||||
|
||||
/* Search for an earlier frame, and try warping to the current. */
|
||||
|
@ -597,7 +597,7 @@ static bool Paste()
|
|||
|
||||
// Extract number of frames
|
||||
sscanf (pGlobal+3, "%d", &range);
|
||||
if (currMovieData.records.size()<pos+range)
|
||||
if (currMovieData.records.size()<static_cast<unsigned int>(pos+range))
|
||||
{
|
||||
currMovieData.insertEmpty(currMovieData.records.size(),pos+range-currMovieData.records.size());
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ static void ConvertFCM(HWND hwndOwner)
|
|||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = hwndOwner;
|
||||
ofn.lpstrFilter = "FCEU <2.0 Movie Files (*.fcm)\0*.fcm\0All files(*.*)\0*.*\0\0";
|
||||
ofn.lpstrFilter = "FCEU <2.0 Movie Files (*.fcm)\0*.fcm\0All Files (*.*)\0*.*\0\0";
|
||||
ofn.lpstrFile = new char[640*1024]; //640K should be enough for anyone
|
||||
ofn.lpstrFile[0] = 0;
|
||||
ofn.nMaxFile = 640*1024;
|
||||
|
@ -1077,7 +1077,7 @@ bool ALoad(char *nameo, char* innerFilename)
|
|||
/// @param initialdir Directory that's pre-selected in the Open File dialog.
|
||||
void LoadNewGamey(HWND hParent, const char *initialdir)
|
||||
{
|
||||
const char filter[] = "All usable files(*.nes,*.nsf,*.fds,*.unf,*.zip,*.rar,*.7z,*.gz)\0*.nes;*.nsf;*.fds;*.unf;*.zip;*.rar;*.7z;*.gz\0All non-compressed usable files(*.nes,*.nsf,*.fds,*.unf)\0*.nes;*.nsf;*.fds;*.unf\0All files (*.*)\0*.*\0\0";
|
||||
const char filter[] = "All usable files (*.nes,*.nsf,*.fds,*.unf,*.zip,*.rar,*.7z,*.gz)\0*.nes;*.nsf;*.fds;*.unf;*.zip;*.rar;*.7z;*.gz\0All non-compressed usable files (*.nes,*.nsf,*.fds,*.unf)\0*.nes;*.nsf;*.fds;*.unf\0All Files (*.*)\0*.*\0\0";
|
||||
char nameo[2048];
|
||||
|
||||
// Create the Open File dialog
|
||||
|
|
|
@ -126,7 +126,7 @@ void MovieData::TryDumpIncremental()
|
|||
if(movieMode == MOVIEMODE_TASEDIT)
|
||||
{
|
||||
//only log the savestate if we are appending to the green zone
|
||||
if (turbo && pauseframe!=-1 && currFrameCounter<currMovieData.records.size())
|
||||
if (turbo && pauseframe!=-1 && static_cast<unsigned int>(currFrameCounter)<currMovieData.records.size())
|
||||
{
|
||||
if (turbo && pauseframe-256>currFrameCounter && ((currFrameCounter-pauseframe)&0xff))
|
||||
return;
|
||||
|
@ -144,7 +144,7 @@ void MovieData::TryDumpIncremental()
|
|||
} else if (currFrameCounter < currMovieData.greenZoneCount || !movie_readonly)
|
||||
{
|
||||
MovieData::dumpSavestateTo(&currMovieData.records[currFrameCounter].savestate,Z_DEFAULT_COMPRESSION);
|
||||
} else if (currFrameCounter > currMovieData.greenZoneCount && currMovieData.greenZoneCount<currMovieData.records.size())
|
||||
} else if (currFrameCounter > currMovieData.greenZoneCount && static_cast<unsigned int>(currMovieData.greenZoneCount)<currMovieData.records.size())
|
||||
{
|
||||
/* May be required in some malformed TAS projects. */
|
||||
MovieData::dumpSavestateTo(&currMovieData.records[currFrameCounter].savestate,Z_DEFAULT_COMPRESSION);
|
||||
|
|
Loading…
Reference in New Issue