From a71081a18ec309a586d5f1eaf9ba612a6b3c2df5 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sun, 17 Dec 2023 14:13:42 +0100 Subject: [PATCH] enhancement: GUI redesign, pt2 --- src/osdep/gui/Navigation.cpp | 26 ++++---- src/osdep/gui/PanelHWInfo.cpp | 2 +- src/osdep/gui/PanelPaths.cpp | 39 +++++++++++ src/osdep/gui/PanelPrio.cpp | 2 +- src/osdep/gui/PanelRTG.cpp | 21 +++--- src/osdep/gui/PanelSavestate.cpp | 14 ++-- src/osdep/gui/PanelSound.cpp | 107 +++++++++++++++++++++++++++++-- src/osdep/gui/SelectFile.cpp | 2 - src/osdep/gui/SelectFolder.cpp | 2 - src/osdep/gui/ShowDiskInfo.cpp | 2 - src/osdep/gui/ShowHelp.cpp | 2 - src/osdep/gui/ShowMessage.cpp | 2 - 12 files changed, 172 insertions(+), 49 deletions(-) diff --git a/src/osdep/gui/Navigation.cpp b/src/osdep/gui/Navigation.cpp index 575fc8a53..134d5ae9c 100644 --- a/src/osdep/gui/Navigation.cpp +++ b/src/osdep/gui/Navigation.cpp @@ -1,6 +1,5 @@ #include #include -#include #include "SelectorEntry.hpp" #include "sysdeps.h" #include "gui_handling.h" @@ -42,12 +41,12 @@ static NavigationMap navMap[] = {"Priority", "cboInactiveRunAtPrio", "cboActiveRunAtPrio", "Miscellaneous", "Savestates" }, {"Savestates", "State0", "State0", "Priority", "Virtual Keyboard"}, {"Virtual Keyboard", "chkVkEnabled", "chkVkEnabled", "Savestates", "Quit"}, - {"Shutdown", "Start", "Quit", "Virtual Keyboard", "Paths"}, - {"Quit", "Shutdown", "Restart", "Virtual Keyboard", "Paths"}, - {"Restart", "Quit", "Help", "Virtual Keyboard", "Paths"}, - {"Help", "Restart", "Reset", "Virtual Keyboard", "Paths"}, - {"Reset", "Help", "Start", "Virtual Keyboard", "Paths"}, - {"Start", "Reset", "Shutdown", "Virtual Keyboard", "Paths"}, + {"Shutdown", "Start", "Quit", "Virtual Keyboard", "About"}, + {"Quit", "Shutdown", "Restart", "Virtual Keyboard", "About"}, + {"Restart", "Quit", "Help", "Virtual Keyboard", "About"}, + {"Help", "Restart", "Reset", "Virtual Keyboard", "About"}, + {"Reset", "Help", "Start", "Virtual Keyboard", "About"}, + {"Start", "Reset", "Shutdown", "Virtual Keyboard", "About"}, // PanelPaths {"cmdSystemROMs", "Paths", "Paths", "cmdRescanROMs", "cmdConfigPath"}, @@ -304,11 +303,12 @@ static NavigationMap navMap[] = { "sndEmulate", "Sound", "sldPaulaVol", "sndDisEmu", "chkAutoSwitching" }, { "chkAutoSwitching", "Sound", "sldPaulaVol", "sndEmulate", "cboChannelMode" }, { "cboChannelMode", "Sound", "cboSeparation", "chkAutoSwitching", "cboFrequency" }, - { "cboFrequency", "Sound", "cboStereoDelay", "cboChannelMode", "chkFloppySound" }, + { "cboFrequency", "Sound", "cboSwapChannels", "cboChannelMode", "chkFloppySound" }, + { "cboSwapChannels", "cboFrequency", "cboStereoDelay", "cboChannelMode", "chkFloppySound" }, { "cboInterpol", "cboSeparation", "Sound", "sldMIDIVol", "cboFilter" }, { "cboFilter", "cboStereoDelay", "Sound", "cboInterpol", "sldSoundBufferSize" }, { "cboSeparation", "cboChannelMode", "cboInterpol", "chkAutoSwitching", "cboStereoDelay" }, - { "cboStereoDelay", "cboFrequency", "cboFilter", "cboSeparation", "chkFloppySound" }, + { "cboStereoDelay", "cboSwapChannels", "cboFilter", "cboSeparation", "chkFloppySound" }, { "sldPaulaVol", "", "", "optSoundPush", "sldCDVol" }, { "sldCDVol", "", "", "sldPaulaVol", "sldAHIVol" }, { "sldAHIVol", "", "", "sldCDVol", "sldMIDIVol" }, @@ -535,7 +535,7 @@ static NavigationMap navMap[] = { "chkMinimizedDisableControllers", "chkInactiveDisableControllers", "Priority", "chkMinimizedDisableSound", "cboMinimizedRunAtPrio" }, // PanelSavestate - { "State0", "Savestates", "Savestates", "LoadState", "State1" }, + { "State0", "Savestates", "Savestates", "cmdLoadState", "State1" }, { "State1", "Savestates", "Savestates", "State0", "State2" }, { "State2", "Savestates", "Savestates", "State1", "State3" }, { "State3", "Savestates", "Savestates", "State2", "State4" }, @@ -549,9 +549,9 @@ static NavigationMap navMap[] = { "State11", "Savestates", "Savestates", "State10", "State12" }, { "State12", "Savestates", "Savestates", "State11", "State13" }, { "State13", "Savestates", "Savestates", "State12", "State14" }, - { "State14", "Savestates", "Savestates", "State13", "LoadState" }, - { "LoadState", "Savestates", "SaveState", "State14", "State0" }, - { "SaveState", "LoadState", "Savestates", "State14", "State0" }, + { "State14", "Savestates", "Savestates", "State13", "cmdLoadState" }, + { "cmdLoadState", "Savestates", "cmdSaveState", "State14", "State0" }, + { "cmdSaveState", "cmdLoadState", "Savestates", "State14", "State0" }, // Virtual Keyboard { "chkVkEnabled", "Virtual Keyboard", "Virtual Keyboard", "chkRetroArchVkbd", "chkVkHires"}, diff --git a/src/osdep/gui/PanelHWInfo.cpp b/src/osdep/gui/PanelHWInfo.cpp index 90b65af9c..92d371699 100644 --- a/src/osdep/gui/PanelHWInfo.cpp +++ b/src/osdep/gui/PanelHWInfo.cpp @@ -13,7 +13,7 @@ #include "blkdev.h" #include "gui_handling.h" -#define MAX_INFOS 10 +#define MAX_INFOS 20 enum { COL_TYPE, COL_NAME, COL_START, COL_END, COL_SIZE, COL_ID, COL_COUNT }; diff --git a/src/osdep/gui/PanelPaths.cpp b/src/osdep/gui/PanelPaths.cpp index 9bb7937fa..047212a90 100644 --- a/src/osdep/gui/PanelPaths.cpp +++ b/src/osdep/gui/PanelPaths.cpp @@ -38,6 +38,10 @@ static gcn::Label* lblRetroArchFile; static gcn::TextField* txtRetroArchFile; static gcn::Button* cmdRetroArchFile; +static gcn::Label* lblWHDBootPath; +static gcn::TextField* txtWHDBootPath; +static gcn::Button* cmdWHDBootPath; + static gcn::CheckBox* chkEnableLogging; static gcn::Label* lblLogfilePath; static gcn::TextField* txtLogfilePath; @@ -120,6 +124,16 @@ class FolderButtonActionListener : public gcn::ActionListener cmdRetroArchFile->requestFocus(); } + else if (actionEvent.getSource() == cmdWHDBootPath) + { + get_whdbootpath(tmp, MAX_DPATH); + if (SelectFolder("Folder for WHDBoot files", tmp)) + { + set_whdbootpath(tmp); + } + cmdWHDBootPath->requestFocus(); + } + else if (actionEvent.getSource() == cmdLogfilePath) { const char* filter[] = { "amiberry.log", "\0" }; @@ -351,6 +365,17 @@ void InitPanelPaths(const config_category& category) cmdRetroArchFile->setBaseColor(gui_baseCol); cmdRetroArchFile->addActionListener(folderButtonActionListener); + lblWHDBootPath = new gcn::Label("WHDBoot files:"); + txtWHDBootPath = new gcn::TextField(); + txtWHDBootPath->setSize(textFieldWidth, TEXTFIELD_HEIGHT); + txtWHDBootPath->setBackgroundColor(colTextboxBackground); + + cmdWHDBootPath = new gcn::Button("..."); + cmdWHDBootPath->setId("cmdWHDBootPath"); + cmdWHDBootPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT); + cmdWHDBootPath->setBaseColor(gui_baseCol); + cmdWHDBootPath->addActionListener(folderButtonActionListener); + enableLoggingActionListener = new EnableLoggingActionListener(); chkEnableLogging = new gcn::CheckBox("Enable logging", true); chkEnableLogging->setId("chkEnableLogging"); @@ -409,6 +434,13 @@ void InitPanelPaths(const config_category& category) category.panel->add(cmdRetroArchFile, DISTANCE_BORDER + textFieldWidth + DISTANCE_NEXT_X, yPos); yPos += txtRetroArchFile->getHeight() + DISTANCE_NEXT_Y; + category.panel->add(lblWHDBootPath, DISTANCE_BORDER, yPos); + yPos += lblWHDBootPath->getHeight() + DISTANCE_NEXT_Y / 2; + category.panel->add(txtWHDBootPath, DISTANCE_BORDER, yPos); + category.panel->add(cmdWHDBootPath, DISTANCE_BORDER + textFieldWidth + DISTANCE_NEXT_X, yPos); + + yPos += txtWHDBootPath->getHeight() + DISTANCE_NEXT_Y * 5; + category.panel->add(lblLogfilePath, DISTANCE_BORDER, yPos); category.panel->add(chkEnableLogging, lblLogfilePath->getX() + lblLogfilePath->getWidth() + DISTANCE_NEXT_X * 3, yPos); yPos += lblLogfilePath->getHeight() + DISTANCE_NEXT_Y / 2; @@ -475,6 +507,10 @@ void ExitPanelPaths() delete txtRetroArchFile; delete cmdRetroArchFile; + delete lblWHDBootPath; + delete txtWHDBootPath; + delete cmdWHDBootPath; + delete chkEnableLogging; delete lblLogfilePath; delete txtLogfilePath; @@ -516,6 +552,9 @@ void RefreshPanelPaths() get_retroarch_file(tmp, MAX_DPATH); txtRetroArchFile->setText(tmp); + get_whdbootpath(tmp, MAX_DPATH); + txtWHDBootPath->setText(tmp); + chkEnableLogging->setSelected(get_logfile_enabled()); get_logfile_path(tmp, MAX_DPATH); txtLogfilePath->setText(tmp); diff --git a/src/osdep/gui/PanelPrio.cpp b/src/osdep/gui/PanelPrio.cpp index 050018080..d05f633c5 100644 --- a/src/osdep/gui/PanelPrio.cpp +++ b/src/osdep/gui/PanelPrio.cpp @@ -209,7 +209,7 @@ void InitPanelPrio(const config_category& category) grpWhenActive->add(chkActiveDisableSound, DISTANCE_BORDER, posY); grpWhenActive->setMovable(false); grpWhenActive->setTitleBarHeight(TITLEBAR_HEIGHT); - grpWhenActive->setSize(cboActiveRunAtPrio->getWidth() + DISTANCE_BORDER * 2, TITLEBAR_HEIGHT + chkActiveDisableSound->getY() + chkActiveDisableSound->getHeight() + DISTANCE_NEXT_Y * 3); + grpWhenActive->setSize(cboActiveRunAtPrio->getWidth() + DISTANCE_BORDER * 3, TITLEBAR_HEIGHT + chkActiveDisableSound->getY() + chkActiveDisableSound->getHeight() + DISTANCE_NEXT_Y * 3); grpWhenActive->setBaseColor(gui_baseCol); category.panel->add(grpWhenActive); diff --git a/src/osdep/gui/PanelRTG.cpp b/src/osdep/gui/PanelRTG.cpp index 939f9d1ac..b79a1a4c5 100644 --- a/src/osdep/gui/PanelRTG.cpp +++ b/src/osdep/gui/PanelRTG.cpp @@ -97,7 +97,7 @@ class RTGActionListener : public gcn::ActionListener auto selected_board = cboBoard->getSelected(); if (selected_board == 0) { - changed_prefs.rtgboards[0].rtgmem_type = 1; + changed_prefs.rtgboards[0].rtgmem_type = GFXBOARD_UAE_Z3; changed_prefs.rtgboards[0].rtgmem_size = 0; } else @@ -112,7 +112,6 @@ class RTGActionListener : public gcn::ActionListener else if (action_event.getSource() == sldGfxmem) { changed_prefs.rtgboards[0].rtgmem_size = memsizes[msi_gfx[static_cast(sldGfxmem->getValue())]]; - changed_prefs.rtgboards[0].rtgmem_type = GFXBOARD_UAE_Z3; } else if (action_event.getSource() == chkRtgMatchDepth) @@ -195,33 +194,29 @@ RTGActionListener* rtg_action_listener; void InitPanelRTG(const config_category& category) { - int sld_width; - int marker_length; - - sld_width = 110; - marker_length = 20; + int marker_length = 20; rtg_action_listener = new RTGActionListener(); - lblBoard = new gcn::Label("Board:"); + lblBoard = new gcn::Label("RTG Graphics Board:"); lblBoard->setAlignment(gcn::Graphics::LEFT); cboBoard = new gcn::DropDown(&rtg_boards_list); - cboBoard->setSize(250, cboBoard->getHeight()); + cboBoard->setSize(300, cboBoard->getHeight()); cboBoard->setBaseColor(gui_baseCol); cboBoard->setBackgroundColor(colTextboxBackground); cboBoard->setId("cboBoard"); cboBoard->addActionListener(rtg_action_listener); lblGfxmem = new gcn::Label("VRAM size:"); + lblGfxsize = new gcn::Label("None "); sldGfxmem = new gcn::Slider(0, 8); - sldGfxmem->setSize(sld_width, SLIDER_HEIGHT); + sldGfxmem->setSize(cboBoard->getWidth() - lblGfxmem->getWidth() - lblGfxsize->getWidth(), SLIDER_HEIGHT); sldGfxmem->setBaseColor(gui_baseCol); sldGfxmem->setMarkerLength(marker_length); sldGfxmem->setStepLength(1); sldGfxmem->setId("Gfxmem"); sldGfxmem->addActionListener(rtg_action_listener); - lblGfxsize = new gcn::Label("None "); chkRtgMatchDepth = new gcn::CheckBox("Match host and RTG color depth if possible"); chkRtgMatchDepth->setId("chkRtgMatchDepth"); @@ -301,7 +296,7 @@ void InitPanelRTG(const config_category& category) auto posY = DISTANCE_BORDER; category.panel->add(lblBoard, DISTANCE_BORDER, posY); - category.panel->add(lblRtgColorModes, lblBoard->getX() + lblBoard->getWidth() + DISTANCE_NEXT_X * 20, posY); + category.panel->add(lblRtgColorModes, lblBoard->getX() + lblBoard->getWidth() + DISTANCE_NEXT_X * 18, posY); posY += lblBoard->getHeight() + DISTANCE_NEXT_Y; category.panel->add(cboBoard, DISTANCE_BORDER, posY); @@ -310,7 +305,7 @@ void InitPanelRTG(const config_category& category) category.panel->add(lblGfxmem, DISTANCE_BORDER, posY); category.panel->add(sldGfxmem, lblGfxmem->getWidth() + DISTANCE_NEXT_X + 8, posY); - category.panel->add(lblGfxsize, lblGfxmem->getWidth() + DISTANCE_NEXT_X + sldGfxmem->getWidth() + 12, posY); + category.panel->add(lblGfxsize, sldGfxmem->getX() + sldGfxmem->getWidth() + 8, posY); category.panel->add(cboRtg32bitModes, cboRtg16bitModes->getX(), posY); posY += sldGfxmem->getHeight() + DISTANCE_NEXT_Y * 2; diff --git a/src/osdep/gui/PanelSavestate.cpp b/src/osdep/gui/PanelSavestate.cpp index 2a7db4533..1a7f8bc59 100644 --- a/src/osdep/gui/PanelSavestate.cpp +++ b/src/osdep/gui/PanelSavestate.cpp @@ -215,7 +215,7 @@ void InitPanelSavestate(const config_category& category) lblTimestamp = new gcn::Label("Thu Aug 23 14:55:02 2001"); - grpNumber = new gcn::Window("Number"); + grpNumber = new gcn::Window("Slot"); grpNumber->add(optState0, 10, 10); grpNumber->add(optState1, optState0->getX(), optState0->getY() + optState0->getHeight() + DISTANCE_NEXT_Y); grpNumber->add(optState2, optState0->getX(), optState1->getY() + optState1->getHeight() + DISTANCE_NEXT_Y); @@ -232,32 +232,32 @@ void InitPanelSavestate(const config_category& category) grpNumber->add(optState13, optState0->getX(), optState12->getY() + optState12->getHeight() + DISTANCE_NEXT_Y); grpNumber->add(optState14, optState0->getX(), optState13->getY() + optState13->getHeight() + DISTANCE_NEXT_Y); grpNumber->setMovable(false); - grpNumber->setSize(BUTTON_WIDTH, optState14->getY() + TITLEBAR_HEIGHT * 2 + DISTANCE_NEXT_Y); + grpNumber->setSize(BUTTON_WIDTH - 20, TITLEBAR_HEIGHT + optState14->getY() + optState14->getHeight() + DISTANCE_NEXT_Y); grpNumber->setTitleBarHeight(TITLEBAR_HEIGHT); grpNumber->setBaseColor(gui_baseCol); - grpScreenshot = new gcn::Window("State screen"); + grpScreenshot = new gcn::Window("State screenshot"); grpScreenshot->setMovable(false); - grpScreenshot->setSize(464, 410); + grpScreenshot->setSize(category.panel->getWidth() - grpNumber->getWidth() - DISTANCE_BORDER * 2 - DISTANCE_NEXT_X, grpNumber->getHeight()); grpScreenshot->setTitleBarHeight(TITLEBAR_HEIGHT); grpScreenshot->setBaseColor(gui_baseCol); cmdLoadState = new gcn::Button("Load State"); cmdLoadState->setSize(BUTTON_WIDTH + 10, BUTTON_HEIGHT); cmdLoadState->setBaseColor(gui_baseCol); - cmdLoadState->setId("LoadState"); + cmdLoadState->setId("cmdLoadState"); cmdLoadState->addActionListener(savestateActionListener); cmdSaveState = new gcn::Button("Save State"); cmdSaveState->setSize(BUTTON_WIDTH + 10, BUTTON_HEIGHT); cmdSaveState->setBaseColor(gui_baseCol); - cmdSaveState->setId("SaveState"); + cmdSaveState->setId("cmdSaveState"); cmdSaveState->addActionListener(savestateActionListener); category.panel->add(grpNumber, DISTANCE_BORDER, DISTANCE_BORDER); category.panel->add(grpScreenshot, grpNumber->getX() + grpNumber->getWidth() + DISTANCE_NEXT_X, DISTANCE_BORDER); category.panel->add(lblTimestamp, grpScreenshot->getX(), grpScreenshot->getY() + grpScreenshot->getHeight() + DISTANCE_NEXT_Y); - const auto posY = category.panel->getHeight() - DISTANCE_BORDER - BUTTON_HEIGHT; + const auto posY = lblTimestamp->getY() + lblTimestamp->getHeight() + DISTANCE_NEXT_Y; category.panel->add(cmdLoadState, grpScreenshot->getX(), posY); category.panel->add(cmdSaveState, cmdLoadState->getX() + cmdLoadState->getWidth() + DISTANCE_NEXT_X, posY); diff --git a/src/osdep/gui/PanelSound.cpp b/src/osdep/gui/PanelSound.cpp index 5c242f90e..d2e4d2133 100644 --- a/src/osdep/gui/PanelSound.cpp +++ b/src/osdep/gui/PanelSound.cpp @@ -54,6 +54,8 @@ static gcn::Label* lblSoundBufferSize; static gcn::RadioButton* optSoundPull; static gcn::RadioButton* optSoundPush; static gcn::DropDown* cboSoundcard; +static gcn::Label* lblSwapChannels; +static gcn::DropDown* cboSwapChannels; static int curr_separation_idx; static int curr_stereodelay_idx; @@ -100,6 +102,45 @@ class string_list_model : public gcn::ListModel static string_list_model soundcard_list(nullptr, 0); +class SwapChannelsListModel : public gcn::ListModel +{ + std::vector options{}; + +public: + SwapChannelsListModel() + { + options.emplace_back("-"); + options.emplace_back("Paula only"); + options.emplace_back("AHI only"); + options.emplace_back("Both"); + } + + int getNumberOfElements() override + { + return int(options.size()); + } + + int add_element(const char* elem) override + { + options.emplace_back(elem); + return 0; + } + + void clear_elements() override + { + options.clear(); + } + + std::string getElementAt(int i) override + { + if (i < 0 || i >= static_cast(options.size())) + return "---"; + return options[i]; + } +}; + +static SwapChannelsListModel swap_channels_list; + class ChannelModeListModel : public gcn::ListModel { std::vector mode{}; @@ -403,6 +444,31 @@ class SoundActionListener : public gcn::ActionListener } } + else if (actionEvent.getSource() == cboSwapChannels) + { + switch (cboSwapChannels->getSelected()) + { + case 0: + changed_prefs.sound_stereo_swap_paula = false; + changed_prefs.sound_stereo_swap_ahi = false; + break; + case 1: + changed_prefs.sound_stereo_swap_paula = true; + changed_prefs.sound_stereo_swap_ahi = false; + break; + case 2: + changed_prefs.sound_stereo_swap_paula = false; + changed_prefs.sound_stereo_swap_ahi = true; + break; + case 3: + changed_prefs.sound_stereo_swap_paula = true; + changed_prefs.sound_stereo_swap_ahi = true; + break; + default: + break; + } + } + else if (actionEvent.getSource() == cboInterpolation) changed_prefs.sound_interpol = cboInterpolation->getSelected(); @@ -572,16 +638,25 @@ void InitPanelSound(const config_category& category) lblFrequency = new gcn::Label("Frequency:"); lblFrequency->setAlignment(gcn::Graphics::RIGHT); cboFrequency = new gcn::DropDown(&frequency_type_list); - cboFrequency->setSize(150, cboFrequency->getHeight()); + cboFrequency->setSize(90, cboFrequency->getHeight()); cboFrequency->setBaseColor(gui_baseCol); cboFrequency->setBackgroundColor(colTextboxBackground); cboFrequency->setId("cboFrequency"); cboFrequency->addActionListener(sound_action_listener); + lblSwapChannels = new gcn::Label("Swap channels:"); + lblSwapChannels->setAlignment(gcn::Graphics::RIGHT); + cboSwapChannels = new gcn::DropDown(&swap_channels_list); + cboSwapChannels->setSize(95, cboSwapChannels->getHeight()); + cboSwapChannels->setBaseColor(gui_baseCol); + cboSwapChannels->setBackgroundColor(colTextboxBackground); + cboSwapChannels->setId("cboSwapChannels"); + cboSwapChannels->addActionListener(sound_action_listener); + lblChannelMode = new gcn::Label("Channel mode:"); lblChannelMode->setAlignment(gcn::Graphics::RIGHT); cboChannelMode = new gcn::DropDown(&channel_mode_list); - cboChannelMode->setSize(150, cboChannelMode->getHeight()); + cboChannelMode->setSize(200, cboChannelMode->getHeight()); cboChannelMode->setBaseColor(gui_baseCol); cboChannelMode->setBackgroundColor(colTextboxBackground); cboChannelMode->setId("cboChannelMode"); @@ -770,11 +845,13 @@ void InitPanelSound(const config_category& category) posY = cboChannelMode->getY() + cboChannelMode->getHeight() + DISTANCE_NEXT_Y; category.panel->add(lblFrequency, lblChannelMode->getX(), posY); category.panel->add(cboFrequency, lblChannelMode->getX(), lblFrequency->getY() + lblFrequency->getHeight() + 10); - category.panel->add(lblSeparation, cboChannelMode->getX() + cboChannelMode->getWidth() + DISTANCE_NEXT_X * 3, lblChannelMode->getY()); + category.panel->add(lblSwapChannels, cboFrequency->getX() + cboFrequency->getWidth() + DISTANCE_NEXT_X, posY); + category.panel->add(cboSwapChannels, cboFrequency->getX() + cboFrequency->getWidth() + DISTANCE_NEXT_X, cboFrequency->getY()); + category.panel->add(lblSeparation, cboChannelMode->getX() + cboChannelMode->getWidth() + DISTANCE_NEXT_X * 2, lblChannelMode->getY()); category.panel->add(cboSeparation, lblSeparation->getX(), lblSeparation->getY() + lblSeparation->getHeight() + 10); category.panel->add(lblStereoDelay, cboSeparation->getX(), lblFrequency->getY()); category.panel->add(cboStereoDelay, lblStereoDelay->getX(), cboFrequency->getY()); - category.panel->add(lblInterpolation, cboSeparation->getX() + cboSeparation->getWidth() + DISTANCE_NEXT_X * 3, lblSeparation->getY()); + category.panel->add(lblInterpolation, cboSeparation->getX() + cboSeparation->getWidth() + DISTANCE_NEXT_X * 2, lblSeparation->getY()); category.panel->add(cboInterpolation, lblInterpolation->getX(), lblInterpolation->getY() + lblInterpolation->getHeight() + 10); category.panel->add(lblFilter, lblInterpolation->getX(), lblFrequency->getY()); category.panel->add(cboFilter, cboInterpolation->getX(), cboFrequency->getY()); @@ -789,6 +866,8 @@ void InitPanelSound(const config_category& category) void ExitPanelSound() { + delete lblSwapChannels; + delete cboSwapChannels; delete cboSoundcard; delete optSoundDisabled; delete optSoundDisabledEmu; @@ -900,6 +979,26 @@ void RefreshPanelSound() break; } + if (changed_prefs.sound_stereo_swap_paula || changed_prefs.sound_stereo_swap_ahi) + { + if (changed_prefs.sound_stereo_swap_paula && changed_prefs.sound_stereo_swap_ahi) + { + cboSwapChannels->setSelected(3); + } + else if (changed_prefs.sound_stereo_swap_ahi) + { + cboSwapChannels->setSelected(2); + } + else if (changed_prefs.sound_stereo_swap_paula) + { + cboSwapChannels->setSelected(1); + } + } + else + { + cboSwapChannels->setSelected(0); + } + cboInterpolation->setSelected(changed_prefs.sound_interpol); auto i = 0; diff --git a/src/osdep/gui/SelectFile.cpp b/src/osdep/gui/SelectFile.cpp index bf261c695..3527b4cbf 100644 --- a/src/osdep/gui/SelectFile.cpp +++ b/src/osdep/gui/SelectFile.cpp @@ -5,9 +5,7 @@ #include #include -#include #include -#include #include "SelectorEntry.hpp" #include "sysdeps.h" diff --git a/src/osdep/gui/SelectFolder.cpp b/src/osdep/gui/SelectFolder.cpp index 647a0e346..e26094128 100644 --- a/src/osdep/gui/SelectFolder.cpp +++ b/src/osdep/gui/SelectFolder.cpp @@ -5,9 +5,7 @@ #include #include -#include #include -#include #include "SelectorEntry.hpp" #include "sysdeps.h" diff --git a/src/osdep/gui/ShowDiskInfo.cpp b/src/osdep/gui/ShowDiskInfo.cpp index 4f57319d1..81cd64069 100644 --- a/src/osdep/gui/ShowDiskInfo.cpp +++ b/src/osdep/gui/ShowDiskInfo.cpp @@ -1,8 +1,6 @@ #include #include -#include #include -#include #include #include diff --git a/src/osdep/gui/ShowHelp.cpp b/src/osdep/gui/ShowHelp.cpp index a89b01932..8ac70754f 100644 --- a/src/osdep/gui/ShowHelp.cpp +++ b/src/osdep/gui/ShowHelp.cpp @@ -2,9 +2,7 @@ #include #include -#include #include -#include #include "SelectorEntry.hpp" #include "sysdeps.h" diff --git a/src/osdep/gui/ShowMessage.cpp b/src/osdep/gui/ShowMessage.cpp index 862b08864..1ef441186 100644 --- a/src/osdep/gui/ShowMessage.cpp +++ b/src/osdep/gui/ShowMessage.cpp @@ -4,9 +4,7 @@ #include #include -#include #include -#include #include "SelectorEntry.hpp" #include "sysdeps.h"