Win32 - Fixed up all open file dialogs to have an All files (*.*) option.

This commit is contained in:
adelikat 2009-06-26 01:40:27 +00:00
parent f5da7d7ebe
commit d328b9513a
5 changed files with 5 additions and 6 deletions

View File

@ -341,7 +341,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\0";
const char filter[]="Table Files (*.TBL)\0*.tbl\0All files (*.*)\0*.*\0";
char nameo[2048]; //todo: possibly no need for this? can lpstrfilter point to loadedcdfile instead?
OPENFILENAME ofn;
memset(&ofn,0,sizeof(ofn));

View File

@ -511,7 +511,7 @@ static void QuickSaveMemWatch() //Save rather than Save as
//Open Memwatch File
static void LoadMemWatch()
{
const char filter[]="Memory address list(*.txt)\0*.txt\0";
const char filter[]="Memory address list(*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
char watchfcontents[2048];
//Now clear last file used variable (memwLastFilename)

View File

@ -42,7 +42,7 @@ void FCEUD_SaveStateAs()
**/
void FCEUD_LoadStateFrom()
{
const char filter[]= FCEU_NAME" Save State (*.fc?)\0*.fc?\0";
const char filter[]= FCEU_NAME" Save State (*.fc?)\0*.fc?\0All Files (*.*)\0*.*\0";
char nameo[2048];
OPENFILENAME ofn;

View File

@ -413,10 +413,9 @@ int TextHookerLoadTableFile(){
unsigned int i, j, line, charcode1, charcode2; //various useful variables
//initialize the "File open" dialogue box
const char filter[]="Table Files (*.THT)\0*.tht\0";
const char filter[]="Table Files (*.THT)\0*.tht\0All Files (*.*)\0*.*\0";
char nameo[2048]; //todo: possibly no need for this? can lpstrfilter point to loadedcdfile instead?
OPENFILENAME ofn;
//StopSound(); //mbg merge 6/30/08
memset(&ofn,0,sizeof(ofn));
ofn.lStructSize=sizeof(ofn);
ofn.hInstance=fceu_hInstance;

View File

@ -2387,7 +2387,7 @@ void FCEUD_LuaRunFrom(void)
ZeroMemory( (LPVOID)&ofn, sizeof(OPENFILENAME) );
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hAppWnd;
ofn.lpstrFilter = "Lua scripts\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;