[XMP] Fixed issue with xmp_default_volume not being correctly applied
- Added menu to modify XMP volume and state
This commit is contained in:
@@ -93,6 +93,7 @@ class EmulatorWindow {
|
||||
const xe::ui::RawImage& image);
|
||||
|
||||
void ToggleProfilesConfigDialog();
|
||||
void ToggleXMPConfigDialog();
|
||||
void SetHotkeysState(bool enabled) { disable_hotkeys_ = !enabled; }
|
||||
|
||||
// Types of button functions for hotkeys.
|
||||
@@ -208,6 +209,24 @@ class EmulatorWindow {
|
||||
EmulatorWindow& emulator_window_;
|
||||
};
|
||||
|
||||
class XMPConfigDialog final : public ui::ImGuiDialog {
|
||||
public:
|
||||
XMPConfigDialog(ui::ImGuiDrawer* imgui_drawer,
|
||||
EmulatorWindow& emulator_window)
|
||||
: ui::ImGuiDialog(imgui_drawer), emulator_window_(emulator_window) {
|
||||
if (emulator_window_.emulator_->audio_media_player()) {
|
||||
volume_ = emulator_window_.emulator_->audio_media_player()->GetVolume();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
void OnDraw(ImGuiIO& io) override;
|
||||
|
||||
private:
|
||||
EmulatorWindow& emulator_window_;
|
||||
float volume_ = 0.0f;
|
||||
};
|
||||
|
||||
explicit EmulatorWindow(Emulator* emulator,
|
||||
ui::WindowedAppContext& app_context, uint32_t width,
|
||||
uint32_t height);
|
||||
@@ -294,6 +313,8 @@ class EmulatorWindow {
|
||||
// messages back to guest.
|
||||
std::unique_ptr<ProfileConfigDialog> profile_config_dialog_;
|
||||
|
||||
std::unique_ptr<XMPConfigDialog> xmp_config_dialog_;
|
||||
|
||||
std::vector<RecentTitleEntry> recently_launched_titles_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user