From fa928a122f7ccd04ba1e8d3774126d8aeaf39cae Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Thu, 22 Oct 2015 18:29:29 -0400 Subject: [PATCH] Fix missing scenario editor menus on Windows This also seems to fix an issue with menu accelerator keys on Windows. --- src/scenedit/scen.main.cpp | 1 + src/tools/menu_accel.win.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scenedit/scen.main.cpp b/src/scenedit/scen.main.cpp index 789deab1..ecd91a96 100644 --- a/src/scenedit/scen.main.cpp +++ b/src/scenedit/scen.main.cpp @@ -118,6 +118,7 @@ void init_scened(int argc, char* argv[]) { ImageRsrc& icon = *ResMgr::get("icon"); mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.copyToImage().getPixelsPtr()); #endif + init_menubar(); // This is called twice because Windows and Mac have different ordering requirements mainPtr.clear(sf::Color::Black); mainPtr.display(); diff --git a/src/tools/menu_accel.win.cpp b/src/tools/menu_accel.win.cpp index f16970a5..d7295619 100644 --- a/src/tools/menu_accel.win.cpp +++ b/src/tools/menu_accel.win.cpp @@ -59,7 +59,7 @@ void accel_table_t::add(WORD cmd, std::string key) { void accel_table_t::build() { if(handle == NULL) - handle = CreateAcceleratorTable(table.data(), table.size()); + handle = CreateAcceleratorTableA(table.data(), table.size()); } void accel_table_t::destroy() {