mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Fix some compiler warnings
This commit is contained in:
+14
-4
@@ -621,12 +621,22 @@ int main(int argc, char *argv[])
|
|||||||
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||||
// If we didn't have an old stdout/stderr handle, use the new CONOUT$ handle
|
// If we didn't have an old stdout/stderr handle, use the new CONOUT$ handle
|
||||||
if (IS_UNSPECIFIED_HANDLE(oldConOut)) {
|
if (IS_UNSPECIFIED_HANDLE(oldConOut)) {
|
||||||
freopen("CONOUT$", "w", stdout);
|
FILE* fp;
|
||||||
setvbuf(stdout, NULL, _IONBF, 0);
|
if (freopen_s(&fp, "CONOUT$", "w", stdout) == 0) {
|
||||||
|
setvbuf(fp, NULL, _IONBF, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
freopen_s(&fp, "NUL", "w", stdout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (IS_UNSPECIFIED_HANDLE(oldConErr)) {
|
if (IS_UNSPECIFIED_HANDLE(oldConErr)) {
|
||||||
freopen("CONOUT$", "w", stderr);
|
FILE* fp;
|
||||||
setvbuf(stderr, NULL, _IONBF, 0);
|
if (freopen_s(&fp, "CONOUT$", "w", stderr) == 0) {
|
||||||
|
setvbuf(fp, NULL, _IONBF, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
freopen_s(&fp, "NUL", "w", stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ int Session::getAudioRendererCapabilities(int audioConfiguration)
|
|||||||
{
|
{
|
||||||
int caps = 0;
|
int caps = 0;
|
||||||
|
|
||||||
|
Q_UNUSED(audioConfiguration);
|
||||||
|
|
||||||
// All audio renderers support arbitrary audio duration
|
// All audio renderers support arbitrary audio duration
|
||||||
caps |= CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION;
|
caps |= CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION;
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ double BandwidthTracker::GetPeakMbps() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int BandwidthTracker::GetWindowSeconds() {
|
unsigned int BandwidthTracker::GetWindowSeconds() {
|
||||||
return windowSeconds.count();
|
return (unsigned int)windowSeconds.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// private methods
|
/// private methods
|
||||||
|
|||||||
Reference in New Issue
Block a user