mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 03:22:45 +02:00
Update to v094r42 release.
byuu says: I imagine you guys will like this WIP very much. Changelog: - ListView check boxes on Windows - ListView removal of columns on reset (changing input dropdowns) - DirectSound audio duplication on latency change - DirectSound crash on 20ms latency - Fullscreen window sizing in multi-monitor setups - Allow joypad bindings of hotkeys - Allow triggers to be mapped (Xbox 360 / XInput / Windows only) - Support joypad rumble for Game Boy Player - Video scale settings modified from {1x,2x,3x} to {2x,3x,4x} - System menu now renames to active emulation core - Added fast forward hotkey Not changing for v095: - not adding input focus settings yet - not adding shaders yet Not changing at all: - not implementing maximize
This commit is contained in:
@@ -65,8 +65,7 @@ static auto Window_configure(GtkWidget* widget, GdkEvent* event, pWindow* p) ->
|
||||
//move
|
||||
if(geometry.x() != p->state().geometry.x() || geometry.y() != p->state().geometry.y()) {
|
||||
if(!p->state().fullScreen) {
|
||||
p->state().geometry.setX(geometry.x());
|
||||
p->state().geometry.setY(geometry.y());
|
||||
p->state().geometry.setPosition({geometry.x(), geometry.y()});
|
||||
}
|
||||
if(!p->locked()) p->self().doMove();
|
||||
}
|
||||
@@ -106,8 +105,9 @@ static auto Window_sizeAllocate(GtkWidget* widget, GtkAllocation* allocation, pW
|
||||
if(allocation->width == p->lastAllocation.width
|
||||
&& allocation->height == p->lastAllocation.height) return;
|
||||
|
||||
p->state().geometry.setWidth(allocation->width);
|
||||
p->state().geometry.setHeight(allocation->height);
|
||||
if(!p->state().fullScreen) {
|
||||
p->state().geometry.setSize({allocation->width, allocation->height});
|
||||
}
|
||||
|
||||
if(auto& layout = p->state().layout) {
|
||||
layout->setGeometry(p->self().geometry().setPosition(0, 0));
|
||||
@@ -259,10 +259,13 @@ auto pWindow::setFocused() -> void {
|
||||
}
|
||||
|
||||
auto pWindow::setFullScreen(bool fullScreen) -> void {
|
||||
if(fullScreen == false) {
|
||||
gtk_window_unfullscreen(GTK_WINDOW(widget));
|
||||
} else {
|
||||
if(fullScreen) {
|
||||
windowedGeometry = state().geometry;
|
||||
gtk_window_fullscreen(GTK_WINDOW(widget));
|
||||
state().geometry = Monitor::geometry(Monitor::primary());
|
||||
} else {
|
||||
gtk_window_unfullscreen(GTK_WINDOW(widget));
|
||||
state().geometry = windowedGeometry;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,15 +5,6 @@ namespace hiro {
|
||||
struct pWindow : pObject {
|
||||
Declare(Window, Object)
|
||||
|
||||
GtkWidget* widget = nullptr;
|
||||
GtkWidget* menuContainer = nullptr;
|
||||
GtkWidget* formContainer = nullptr;
|
||||
GtkWidget* statusContainer = nullptr;
|
||||
GtkWidget* gtkMenu = nullptr;
|
||||
GtkWidget* gtkStatus = nullptr;
|
||||
GtkAllocation lastAllocation = {0};
|
||||
bool onSizePending = false;
|
||||
|
||||
auto append(sLayout layout) -> void;
|
||||
auto append(sMenuBar menuBar) -> void;
|
||||
auto append(sStatusBar statusBar) -> void;
|
||||
@@ -45,6 +36,16 @@ struct pWindow : pObject {
|
||||
auto _setStatusText(const string& text) -> void;
|
||||
auto _setStatusVisible(bool visible) -> void;
|
||||
auto _statusHeight() const -> signed;
|
||||
|
||||
GtkWidget* widget = nullptr;
|
||||
GtkWidget* menuContainer = nullptr;
|
||||
GtkWidget* formContainer = nullptr;
|
||||
GtkWidget* statusContainer = nullptr;
|
||||
GtkWidget* gtkMenu = nullptr;
|
||||
GtkWidget* gtkStatus = nullptr;
|
||||
GtkAllocation lastAllocation = {0};
|
||||
bool onSizePending = false;
|
||||
Geometry windowedGeometry{128, 128, 256, 256};
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user