mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v032a release.
- Windows: file open filters are now working once again - All ports: emulation speed setting is now properly restored at startup
This commit is contained in:
parent
ebb9367c68
commit
bbc77a6cf2
|
@ -1,5 +1,5 @@
|
|||
bsnes
|
||||
Version: 0.032
|
||||
Version: 0.032a
|
||||
Author: byuu
|
||||
|
||||
--------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define BSNES_VERSION "0.032"
|
||||
#define BSNES_VERSION "0.032a"
|
||||
#define BSNES_TITLE "bsnes v" BSNES_VERSION
|
||||
|
||||
#define BUSCORE sBus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
hiro
|
||||
version: 0.004 (2008-05-14)
|
||||
version: 0.005 (2008-05-25)
|
||||
author: byuu
|
||||
license: public domain
|
||||
*/
|
||||
|
|
|
@ -111,35 +111,36 @@ bool pHiro::file_open(Window *focus, char *filename, const char *path, const cha
|
|||
|
||||
lstring type, part;
|
||||
strcpy(f, "");
|
||||
split(type, "|", filter);
|
||||
split(type, "\n", filter);
|
||||
for(int i = 0; i < count(type); i++) {
|
||||
split(part, ";", type[i]);
|
||||
if(count(part) != 2)continue;
|
||||
split(part, "\t", type[i]);
|
||||
if(count(part) != 2) continue;
|
||||
|
||||
strcat(f, part[0]);
|
||||
strcat(f, " (");
|
||||
strcat(f, part[1]);
|
||||
strcat(f, ")|");
|
||||
strcat(f, ")\t");
|
||||
replace(part[1], ",", ";");
|
||||
strcat(f, part[1]);
|
||||
strcat(f, "|");
|
||||
strcat(f, "\t");
|
||||
}
|
||||
|
||||
char *pf = f();
|
||||
for(int i = strlen(pf) - 1; i >= 0; i--) {
|
||||
if(pf[i] == '|') pf[i] = '\0';
|
||||
}
|
||||
|
||||
utf16 wpf(pf);
|
||||
utf16 wfilter(f);
|
||||
utf16 wdir(dir);
|
||||
wchar_t wfilename[_MAX_PATH] = L"";
|
||||
|
||||
wchar_t *p = wfilter;
|
||||
while(*p != L'\0') {
|
||||
if(*p == L'\t') *p = L'\0';
|
||||
p++;
|
||||
}
|
||||
|
||||
OPENFILENAME ofn;
|
||||
strcpy(filename, "");
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = focus ? focus->p.hwnd : 0;
|
||||
ofn.lpstrFilter = wpf;
|
||||
ofn.lpstrFilter = wfilter;
|
||||
ofn.lpstrInitialDir = wdir;
|
||||
ofn.lpstrFile = wfilename;
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
|
@ -158,35 +159,36 @@ bool pHiro::file_save(Window *focus, char *filename, const char *path, const cha
|
|||
|
||||
lstring type, part;
|
||||
strcpy(f, "");
|
||||
split(type, "|", filter);
|
||||
split(type, "\n", filter);
|
||||
for(int i = 0; i < count(type); i++) {
|
||||
split(part, ";", type[i]);
|
||||
if(count(part) != 2)continue;
|
||||
split(part, "\t", type[i]);
|
||||
if(count(part) != 2) continue;
|
||||
|
||||
strcat(f, part[0]);
|
||||
strcat(f, " (");
|
||||
strcat(f, part[1]);
|
||||
strcat(f, ")|");
|
||||
strcat(f, ")\t");
|
||||
replace(part[1], ",", ";");
|
||||
strcat(f, part[1]);
|
||||
strcat(f, "|");
|
||||
strcat(f, "\t");
|
||||
}
|
||||
|
||||
char *pf = f();
|
||||
for(int i = strlen(pf) - 1; i >= 0; i--) {
|
||||
if(pf[i] == '|') pf[i] = '\0';
|
||||
}
|
||||
|
||||
utf16 wpf(pf);
|
||||
utf16 wfilter(f);
|
||||
utf16 wdir(dir);
|
||||
wchar_t wfilename[_MAX_PATH] = L"";
|
||||
|
||||
wchar_t *p = wfilter;
|
||||
while(*p != L'\0') {
|
||||
if(*p == L'\t') *p = L'\0';
|
||||
p++;
|
||||
}
|
||||
|
||||
OPENFILENAME ofn;
|
||||
strcpy(filename, "");
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = focus ? focus->p.hwnd : 0;
|
||||
ofn.lpstrFilter = wpf;
|
||||
ofn.lpstrFilter = wfilter;
|
||||
ofn.lpstrInitialDir = wdir;
|
||||
ofn.lpstrFile = wfilename;
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
|
|
|
@ -287,14 +287,17 @@ bool load_rom(char *fn) {
|
|||
|
||||
return hiro().file_open(0, fn,
|
||||
dir[0],
|
||||
"SNES images;*.smc,*.sfc,*.swc,*.fig,*.bs,*.st"
|
||||
"SNES images\t"
|
||||
"*.smc,*.sfc,*.swc,*.fig,*.bs,*.st"
|
||||
#if defined(GZIP_SUPPORT)
|
||||
",*.gz,*.z,*.zip"
|
||||
#endif
|
||||
#if defined(JMA_SUPPORT)
|
||||
",*.jma"
|
||||
#endif
|
||||
"|All files;*.*"
|
||||
"\n"
|
||||
"All files\t"
|
||||
"*.*"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,55 +1,55 @@
|
|||
#include "resource.cpp"
|
||||
|
||||
#include "base/main.cpp"
|
||||
#include "base/about.cpp"
|
||||
#include "base/message.cpp"
|
||||
|
||||
#include "loader/bsxloader.cpp"
|
||||
#include "loader/stloader.cpp"
|
||||
|
||||
#include "settings/settings.cpp"
|
||||
#include "settings/videosettings.cpp"
|
||||
#include "base/main.cpp"
|
||||
#include "base/about.cpp"
|
||||
#include "base/message.cpp"
|
||||
|
||||
#include "loader/bsxloader.cpp"
|
||||
#include "loader/stloader.cpp"
|
||||
|
||||
#include "settings/settings.cpp"
|
||||
#include "settings/videosettings.cpp"
|
||||
#include "settings/inputconfig.cpp"
|
||||
#include "settings/pathsettings.cpp"
|
||||
#include "settings/cheateditor.cpp"
|
||||
#include "settings/advanced.cpp"
|
||||
|
||||
#include "settings/pathsettings.cpp"
|
||||
#include "settings/cheateditor.cpp"
|
||||
#include "settings/advanced.cpp"
|
||||
|
||||
void ui_init() {
|
||||
hiro().disable_screensaver();
|
||||
resource::init();
|
||||
|
||||
window_main.setup();
|
||||
window_about.setup();
|
||||
window_message.setup();
|
||||
|
||||
window_bsxloader.setup();
|
||||
window_stloader.setup();
|
||||
|
||||
window_video_settings.setup();
|
||||
window_input_config.setup();
|
||||
window_path_settings.setup();
|
||||
window_cheat_editor.setup();
|
||||
window_advanced.setup();
|
||||
window_settings.setup();
|
||||
|
||||
event::update_opacity();
|
||||
event::update_video_settings(); //call first time to resize main window and update menubar
|
||||
window_main.show();
|
||||
while(hiro().pending()) hiro().run();
|
||||
|
||||
window_main.setup();
|
||||
window_about.setup();
|
||||
window_message.setup();
|
||||
|
||||
window_bsxloader.setup();
|
||||
window_stloader.setup();
|
||||
|
||||
window_video_settings.setup();
|
||||
window_input_config.setup();
|
||||
window_path_settings.setup();
|
||||
window_cheat_editor.setup();
|
||||
window_advanced.setup();
|
||||
window_settings.setup();
|
||||
|
||||
event::update_opacity();
|
||||
event::update_video_settings(); //call first time to resize main window and update menubar
|
||||
window_main.show();
|
||||
while(hiro().pending()) hiro().run();
|
||||
|
||||
video.driver(config::system.video);
|
||||
audio.driver(config::system.audio);
|
||||
input.driver(config::system.input);
|
||||
|
||||
video.set(Video::Handle, window_main.view.handle());
|
||||
input.driver(config::system.input);
|
||||
|
||||
video.set(Video::Handle, window_main.view.handle());
|
||||
video.set(Video::Synchronize, false);
|
||||
audio.set(Audio::Handle, window_main.handle());
|
||||
audio.set(Audio::Synchronize, config::system.emulation_speed != 0);
|
||||
audio.set(Audio::Frequency, 32000);
|
||||
input.set(Input::Handle, window_main.handle());
|
||||
|
||||
video.init();
|
||||
audio.init();
|
||||
//sets Audio::Synchronize and Audio::Frequency
|
||||
event::update_emulation_speed(config::system.emulation_speed);
|
||||
|
||||
video.init();
|
||||
audio.init();
|
||||
input.init();
|
||||
|
||||
event::update_video_settings(); //call second time to update uiVideo->settings
|
||||
|
@ -57,13 +57,13 @@ void ui_init() {
|
|||
//UI setup complete, hook keyboard callbacks
|
||||
snesinterface.input_ready = bind(&MainWindow::input_ready, &window_main);
|
||||
input_manager.on_keydown = bind(&event::keydown);
|
||||
input_manager.on_keyup = bind(&event::keyup);
|
||||
}
|
||||
|
||||
void ui_term() {
|
||||
window_main.hide();
|
||||
input_manager.on_keyup = bind(&event::keyup);
|
||||
}
|
||||
|
||||
video.term();
|
||||
audio.term();
|
||||
input.term();
|
||||
}
|
||||
void ui_term() {
|
||||
window_main.hide();
|
||||
|
||||
video.term();
|
||||
audio.term();
|
||||
input.term();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue