Merge pull request #3831 from FearlessTobi/add-volume-slider

citra_qt: Add a volume slider
This commit is contained in:
James Rowe 2018-07-18 09:56:47 -06:00 committed by GitHub
commit 2f8c9c8126
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 110 additions and 20 deletions

View file

@ -345,13 +345,11 @@ void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext&
void Module::Interface::GetSoundVolume(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx, 0x17, 0, 0};
const u8 volume = 0x3F; // TODO(purpasmart): Find out if this is the max value for the volume
const u8 volume = static_cast<u8>(0x3F * Settings::values.volume);
IPC::RequestBuilder rb = rp.MakeBuilder(2, 0);
rb.Push(RESULT_SUCCESS);
rb.Push(volume);
LOG_WARNING(Service_HID, "(STUBBED) called");
}
Module::Interface::Interface(std::shared_ptr<Module> hid, const char* name, u32 max_session)

View file

@ -139,6 +139,7 @@ struct Values {
std::string sink_id;
bool enable_audio_stretching;
std::string audio_device_id;
float volume;
// Camera
std::array<std::string, Service::CAM::NumCameras> camera_name;