mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 11:03:06 +02:00
Update to v106r26 release.
byuu says: Changelog: - nall: added -static-libgcc -static-libstdc++ to Windows/GCC link flags - bsnes, higan: added program icons to main window when game isn't loaded - bsnes: improved recent games menu sorting - bsnes: fixed multi-game recent game loading on Windows - bsnes: completed path override support - bsnes, higan: added screensaver suppression on Windows - icarus: add 32K volatile RAM to SuperFX boards that report no RAM (fixes Starfox) - bsnes, higan: added automatic dependency generation [Talarubi] - hiro/GTK: appending actions to menus restores enabled() state - higan: use board node inside manifest.bml if it exists - bsnes: added blur emulation and color emulation options to view menu - ruby: upgraded input.sdl to SDL 2.0 (though it makes no functional difference sadly) - ruby: removed video.sdl (due to deprecating SDL 1.2) - nall, ruby: improvements to HID class (generic vendor and product IDs) Errata: - bsnes, higan: on Windows, Application::Windows::onScreenSaver needs `[&]` lambda capture, not `[]` - find it in presentation/presentation.cpp
This commit is contained in:
@@ -66,10 +66,19 @@ auto Application::Windows::doModalChange(bool modal) -> void {
|
||||
if(state.windows.onModalChange) return state.windows.onModalChange(modal);
|
||||
}
|
||||
|
||||
auto Application::Windows::doScreenSaver() -> bool {
|
||||
if(state.windows.onScreenSaver) return state.windows.onScreenSaver();
|
||||
return true; //true = allow screen saver (default); false = suppress screen saver
|
||||
}
|
||||
|
||||
auto Application::Windows::onModalChange(const function<void (bool)>& callback) -> void {
|
||||
state.windows.onModalChange = callback;
|
||||
}
|
||||
|
||||
auto Application::Windows::onScreenSaver(const function<bool ()>& callback) -> void {
|
||||
state.windows.onScreenSaver = callback;
|
||||
}
|
||||
|
||||
//Cocoa
|
||||
//=====
|
||||
|
||||
|
@@ -389,7 +389,9 @@ struct Application {
|
||||
|
||||
struct Windows {
|
||||
static auto doModalChange(bool modal) -> void;
|
||||
static auto doScreenSaver() -> bool;
|
||||
static auto onModalChange(const function<void (bool)>& callback = {}) -> void;
|
||||
static auto onScreenSaver(const function<bool ()>& callback = {}) -> void;
|
||||
};
|
||||
|
||||
struct Cocoa {
|
||||
@@ -413,6 +415,7 @@ struct Application {
|
||||
|
||||
struct Windows {
|
||||
function<void (bool)> onModalChange;
|
||||
function<bool ()> onScreenSaver;
|
||||
} windows;
|
||||
|
||||
struct Cocoa {
|
||||
|
@@ -20,6 +20,7 @@ auto pMenu::destruct() -> void {
|
||||
auto pMenu::append(sAction action) -> void {
|
||||
if(action->self()) {
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(gtkMenu), action->self()->widget);
|
||||
action->self()->setEnabled(action->enabled(true));
|
||||
action->self()->setFont(action->font(true));
|
||||
action->self()->setVisible(action->visible()); //hidden parent will hide child; no need to inherit visibility
|
||||
}
|
||||
|
@@ -259,6 +259,10 @@ static auto CALLBACK Application_windowProc(HWND hwnd, UINT msg, WPARAM wparam,
|
||||
case WM_ERASEBKGND: if(pWindow->onEraseBackground()) return true; break;
|
||||
case WM_ENTERMENULOOP: case WM_ENTERSIZEMOVE: pWindow->onModalBegin(); return false;
|
||||
case WM_EXITMENULOOP: case WM_EXITSIZEMOVE: pWindow->onModalEnd(); return false;
|
||||
case WM_SYSCOMMAND:
|
||||
if(wparam == SC_SCREENSAVE || wparam == SC_MONITORPOWER) {
|
||||
if(!Application::Windows::doScreenSaver()) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return Shared_windowProc(DefWindowProc, hwnd, msg, wparam, lparam);
|
||||
|
Reference in New Issue
Block a user