Skip to content

Commit

Permalink
Bring back bsnes Pseudo Fullscreen Option
Browse files Browse the repository at this point in the history
  • Loading branch information
remutro committed Dec 6, 2024
1 parent 431aba5 commit 4fbc88c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ares/ares/node/video/screen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct Screen : Video {
f64 _luminance = 1.0;
u32 _fillColor = 0;
bool _colorBleed = false;
bool _colorBleedWidth = 1;
u32 _colorBleedWidth = 1;
bool _interframeBlending = false;
bool _overscan = true;
u32 _rotation = 0; //counter-clockwise (90 = left, 270 = right)
Expand Down
4 changes: 4 additions & 0 deletions desktop-ui/input/hotkeys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ auto InputManager::createHotkeys() -> void {
program.videoFullScreenToggle();
}));

hotkeys.append(InputHotkey("Toggle Pseudo-Fullscreen").onPress([&] {
program.videoPseudoFullScreenToggle();
}));

hotkeys.append(InputHotkey("Toggle Mouse Capture").onPress([&] {
if(!emulator) return;
if(!ruby::input.acquired()) {
Expand Down
14 changes: 13 additions & 1 deletion desktop-ui/program/drivers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@ auto Program::videoFullScreenToggle() -> void {
}
}

//
auto Program::videoPseudoFullScreenToggle() -> void {
if(ruby::video.fullScreen()) return;

if(!presentation.fullScreen()) {
presentation.setFullScreen(true);
presentation.menuBar.setVisible(false);
if(!ruby::input.acquired() && ruby::video.hasMonitors().size() == 1) ruby::input.acquire();
} else {
if(ruby::input.acquired()) ruby::input.release();
presentation.menuBar.setVisible(true);
presentation.setFullScreen(false);
}
}

auto Program::audioDriverUpdate() -> void {
ruby::audio.create(settings.audio.driver);
Expand Down
1 change: 1 addition & 0 deletions desktop-ui/program/program.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct Program : ares::Platform {
auto videoMonitorUpdate() -> void;
auto videoFormatUpdate() -> void;
auto videoFullScreenToggle() -> void;
auto videoPseudoFullScreenToggle() -> void;

auto audioDriverUpdate() -> void;
auto audioDeviceUpdate() -> void;
Expand Down

0 comments on commit 4fbc88c

Please sign in to comment.