Skip to content

Commit 95bbab3

Browse files
committed
Last commit before vAmiga integration
1 parent c028198 commit 95bbab3

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

libs/amDebugger/src/amDebugger/debuggerWndApp.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,8 @@ bool DebuggerApp::isWndVisible() const
167167
{
168168
uint32_t window_flags = SDL_GetWindowFlags(m_pWindow);
169169
if (window_flags & (SDL_WINDOW_HIDDEN | SDL_WINDOW_MINIMIZED))
170-
{
171170
return false;
172-
}
173-
else
174-
{
175-
return true;
176-
}
171+
return true;
177172
}
178173

179174

src/quasar_app/ui/uae_options_wnd.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "qd/qui/uiMessages.h"
1919
#include "qd/stl/algorithm.h"
2020
#include "qd/stl/string.h"
21+
#include "quaesar_config.h"
2122

2223

2324
namespace qsr {
@@ -198,22 +199,28 @@ void UaeOptionsDlg::onUiNodeCreated(qd::UiNodeCreator* mk) {
198199
setSize({600, 400});
199200

200201
UCategory* pCat;
201-
202202
createCategory(EOptionCat::UNDEF, EOptionCat::ROOT);
203+
203204
if (pCat = createCategory(EOptionCat::QUICK_START, EOptionCat::ROOT)) {
204205
pCat->title = "Quick Start Options";
205206
}
206207

207208
// /*UCategory* pCatHW =*/createCategory(EOptionCat::HARDWARE, EOptionCat::ROOT);
208-
// /*UCategory* pCatHost =*/createCategory(EOptionCat::HOST, EOptionCat::ROOT);
209+
210+
if (pCat = createCategory(EOptionCat::HOST, EOptionCat::ROOT)) {
211+
pCat->title = "Main options";
212+
createOption(pCat)->setDrawCb(
213+
[](OptionDrawCtx*) { ImGui::Checkbox("Use ESC key to Quit", &g_cfg_main->quitByEsc); });
214+
}
215+
209216
// /*UCategory* pCatCpu =*/createCategory(EOptionCat::CPU, EOptionCat::HARDWARE);
210217

211-
if (UCategory* pCat = createCategory(EOptionCat::FLOPPY, EOptionCat::HARDWARE)) {
218+
if (pCat = createCategory(EOptionCat::FLOPPY, EOptionCat::HARDWARE)) {
212219
pCat->title = "Floppy Drives Options";
213-
createOption(pCat, "Floppy 0")->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 0); });
214-
createOption(pCat, "Floppy 1")->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 1); });
215-
createOption(pCat, "Floppy 2")->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 2); });
216-
createOption(pCat, "Floppy 3")->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 3); });
220+
createOption(pCat)->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 0); });
221+
createOption(pCat)->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 1); });
222+
createOption(pCat)->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 2); });
223+
createOption(pCat)->setDrawCb([](OptionDrawCtx* ctx) { draw_opt_floppy_cfg(ctx, 3); });
217224
}
218225
}
219226

src/quasar_app/ui/uae_options_wnd.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,11 @@ struct OptionDrawCtx {
4848

4949
struct UOption {
5050
public:
51-
qd::string title;
5251
UCategory* parentCat = nullptr;
5352
using TDrawOptionCb = eastl::fixed_function<2 * sizeof(void*), void(OptionDrawCtx*)>;
5453
TDrawOptionCb drawOptionCb;
5554

56-
UOption(const char* title) : title(title) {
57-
}
55+
UOption() = default;
5856

5957
UOption& setDrawCb(UOption::TDrawOptionCb&& cb) {
6058
drawOptionCb = std::move(cb);

0 commit comments

Comments
 (0)