Keep focus on the panel list when changing settings / tools panels.
Fixed Windows combo box flickering when changing panels.
Suppress Alt+F4 on Windows in fullscreen mode.
This commit is contained in:
byuu 2019-09-06 23:19:44 +09:00
parent a6ebce428f
commit 56c9a5195e
9 changed files with 11 additions and 7 deletions

View File

@ -29,13 +29,13 @@ using namespace nall;
namespace Emulator {
static const string Name = "bsnes";
static const string Version = "108.17";
static const string Version = "109";
static const string Author = "byuu";
static const string License = "GPLv3";
static const string Website = "https://byuu.org";
//incremented only when serialization format changes
static const string SerializerVersion = "108.4";
static const string SerializerVersion = "109";
namespace Constants {
namespace Colorburst {

View File

@ -4,7 +4,7 @@ Video video;
Audio audio;
Input input;
unique_pointer<Emulator::Interface> emulator;
//
auto locate(string name) -> string {
string location = {Path::program(), name};
if(inode::exists(location)) return location;

View File

@ -245,4 +245,5 @@ auto SettingsWindow::show(int index) -> void {
panelContainer.resize();
setVisible();
setFocused();
panelList.setFocused();
}

View File

@ -99,4 +99,5 @@ auto ToolsWindow::show(int index) -> void {
panelContainer.resize();
setVisible();
setFocused();
panelList.setFocused();
}

View File

@ -45,12 +45,10 @@ auto pComboButton::reset() -> void {
}
auto pComboButton::setGeometry(Geometry geometry) -> void {
//height = minimum drop-down list height; use CB_SETITEMHEIGHT to control actual widget height
pWidget::setGeometry({geometry.x(), geometry.y(), geometry.width(), 1});
RECT rc;
GetWindowRect(hwnd, &rc);
unsigned adjustedHeight = geometry.height() - ((rc.bottom - rc.top) - SendMessage(hwnd, CB_GETITEMHEIGHT, (WPARAM)-1, 0));
SendMessage(hwnd, CB_SETITEMHEIGHT, (WPARAM)-1, adjustedHeight);
geometry.setY(geometry.y() + (geometry.height() - (rc.bottom - rc.top)));
pWidget::setGeometry({geometry.x(), geometry.y(), geometry.width(), 1});
}
auto pComboButton::onChange() -> void {

View File

@ -4,6 +4,7 @@
#undef interface
static LRESULT CALLBACK VideoDirect3D9_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if(msg == WM_SYSKEYDOWN && waram == VK_F4) return false;
return DefWindowProc(hwnd, msg, wparam, lparam);
}

View File

@ -2,6 +2,7 @@
#undef interface
static LRESULT CALLBACK VideoDirectDraw7_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if(msg == WM_SYSKEYDOWN && waram == VK_F4) return false;
return DefWindowProc(hwnd, msg, wparam, lparam);
}

View File

@ -1,4 +1,5 @@
static LRESULT CALLBACK VideoGDI_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if(msg == WM_SYSKEYDOWN && waram == VK_F4) return false;
return DefWindowProc(hwnd, msg, wparam, lparam);
}

View File

@ -4,6 +4,7 @@
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
static LRESULT CALLBACK VideoOpenGL32_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
if(msg == WM_SYSKEYDOWN && waram == VK_F4) return false;
return DefWindowProc(hwnd, msg, wparam, lparam);
}