mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35:38 +00:00
(Windows) Fixed some MinGW compiler warnings.
This commit is contained in:
parent
e30cad2e9f
commit
970b7dd63d
|
@ -131,9 +131,10 @@ void VolumeControl::init()
|
||||||
// Retrieve endpoint volume.
|
// Retrieve endpoint volume.
|
||||||
defaultDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER,
|
defaultDevice->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER,
|
||||||
nullptr, reinterpret_cast<LPVOID*>(&endpointVolume));
|
nullptr, reinterpret_cast<LPVOID*>(&endpointVolume));
|
||||||
if (endpointVolume == nullptr)
|
if (endpointVolume == nullptr) {
|
||||||
LOG(LogError) << "VolumeControl::init(): "
|
LOG(LogError) << "VolumeControl::init(): "
|
||||||
"Failed to get default audio endpoint volume!";
|
"Failed to get default audio endpoint volume!";
|
||||||
|
}
|
||||||
// Release default device. we don't need it anymore.
|
// Release default device. we don't need it anymore.
|
||||||
defaultDevice->Release();
|
defaultDevice->Release();
|
||||||
}
|
}
|
||||||
|
@ -245,8 +246,9 @@ void VolumeControl::setVolume(int volume)
|
||||||
float floatVolume = 0.0f; // 0-1
|
float floatVolume = 0.0f; // 0-1
|
||||||
if (volume > 0)
|
if (volume > 0)
|
||||||
floatVolume = static_cast<float>(volume) / 100.0f;
|
floatVolume = static_cast<float>(volume) / 100.0f;
|
||||||
if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK)
|
if (endpointVolume->SetMasterVolumeLevelScalar(floatVolume, nullptr) != S_OK) {
|
||||||
LOG(LogError) << "VolumeControl::setVolume(): Failed to set master volume";
|
LOG(LogError) << "VolumeControl::setVolume(): Failed to set master volume";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ bool parseArgs(int argc, char* argv[])
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
// Print any command line output to the console.
|
// Print any command line output to the console.
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
win64ConsoleType consoleType = outputToConsole(false);
|
outputToConsole(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string portableFilePath = Utils::FileSystem::getExePath() + "/portable.txt";
|
std::string portableFilePath = Utils::FileSystem::getExePath() + "/portable.txt";
|
||||||
|
|
Loading…
Reference in a new issue