Misc cleanups and fixes

This commit is contained in:
Henrik Rydgård committed 2026-03-04 14:41:59 +01:00
1 parent ffa36cbe77
commit 892ef99daa
21 files changed
+25 -25

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ float ControlMapper::GetDeviceAxisThreshold(int device, const InputMapping &mapp
if (absCoValue > 0.0f) {
// Bias down the threshold if the other axis is active.
const float biasedThreshold = g_Config.fAnalogStickThreshold * (1.0f - absCoValue * 0.35f);
INFO_LOG(Log::System, "coValue: %f threshold: %f", absCoValue, biasedThreshold);
// INFO_LOG(Log::System, "coValue: %f threshold: %f", absCoValue, biasedThreshold);
return biasedThreshold;
}
}
+2 -1
View File
@@ -842,9 +842,10 @@ void GamePauseScreen::OnExit(UI::EventParams &e) {
std::string confirmExitMessage = GetConfirmExitMessage();
if (!confirmExitMessage.empty()) {
auto mm = GetI18NCategory(I18NCat::MAINMENU);
auto di = GetI18NCategory(I18NCat::DIALOG);
std::string_view title = di->T("Are you sure you want to exit?");
screenManager()->push(new UI::MessagePopupScreen(title, confirmExitMessage, di->T("Exit"), di->T("Cancel"), [this](bool result) {
screenManager()->push(new UI::MessagePopupScreen(title, confirmExitMessage, mm->T("Exit"), di->T("Cancel"), [this](bool result) {
if (result) {
if (g_Config.bPauseMenuExitsEmulator) {
System_ExitApp();
+3 -5
View File
@@ -67,7 +67,6 @@ WASAPIContext::~WASAPIContext() {
}
Stop();
enumerator_->UnregisterEndpointNotificationCallback(&notificationClient_);
delete[] tempBuf_;
}
WASAPIContext::AudioFormat WASAPIContext::Classify(const WAVEFORMATEX *format) {
@@ -162,8 +161,7 @@ bool WASAPIContext::InitOutputDevice(std::string_view uniqueId, LatencyMode late
}
// Get rid of any old tempBuf_.
delete[] tempBuf_;
tempBuf_ = nullptr;
tempBuf_.reset();
if (SUCCEEDED(hr)) {
audioClient3_->GetMixFormat(&format_);
@@ -279,7 +277,7 @@ bool WASAPIContext::InitOutputDevice(std::string_view uniqueId, LatencyMode late
audioClient_->GetService(IID_PPV_ARGS(&renderClient_));
if (createBuffer) {
tempBuf_ = new float[reportedBufferSize_ * 2];
tempBuf_ = std::make_unique<float[]>(reportedBufferSize_ * 2);
}
}
@@ -372,7 +370,7 @@ void WASAPIContext::AudioLoop() {
}
} else {
// We decided previously that we need conversion, so mix to our temp buffer...
callback_(tempBuf_, framesToWrite, format_->nSamplesPerSec, userdata_);
callback_(tempBuf_.get(), framesToWrite, format_->nSamplesPerSec, userdata_);
// .. and convert according to format (we support multi-channel float and s16)
if (format == AudioFormat::S16 && buffer) {
// Need to convert.
+2 -1
View File
@@ -9,6 +9,7 @@
#include <thread>
#include <string>
#include <string_view>
#include <memory>
#include <wrl/client.h>
class WASAPIContext : public AudioBackend {
@@ -97,5 +98,5 @@ private:
std::string deviceId_;
std::atomic<bool> defaultDeviceChanged_{};
float *tempBuf_ = nullptr;
std::unique_ptr<float[]> tempBuf_;
};
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Налады мышы
Mouse sensitivity = Адчувальнасць мышы
Mouse smoothing = Згладжванне мышшу
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Няма (Адкл.)
Off = Выкл.
On-screen touch controls = Сэнсарнае кіраванне на экране
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Настройки на мишката
Mouse sensitivity = Чувствителност на мишката
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Нищо (изключено)
Off = Off
On-screen touch controls = Управление с докосване на екрана
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Žádné (zakázáno)
Off = Vypnuto
On-screen touch controls = Dotykové ovládání na obrazovce
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Maus-Einstellungen
Mouse sensitivity = Mausempfindlichkeit
Mouse smoothing = Mausglättung
Mouse wheel button-release delay = Verzögerung beim Loslassen der Mausradtaste
MouseControl Tip = Du kannst jetzt die Maus im Steuerungszuordnungs-Bildschirm zuordnen, indem du auf das Symbol „M“ drückst
MouseControl Tip = Du kannst Maus-Eingaben im Steuerungszuordnungs-Bildschirm zuordnen, indem du auf das Symbol „M“ drückst
None (Disabled) = Keine (Deaktiviert)
Off = Aus
On-screen touch controls = Berührungs-Bildschirmtasten
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = Tobolo'na jo layar sentu
+1 -1
View File
@@ -179,7 +179,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = On-screen touch controls
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Ajustes de ratón
Mouse sensitivity = Sensibilidad de ratón
Mouse smoothing = Suavidad de ratón
Mouse wheel button-release delay = Retraso al soltar botón de la rueda del mouse
MouseControl Tip = Ahora puedes configurar el mouse en la pantalla de configuración de mando presionando el ícono 'M'.
MouseControl Tip = Puedes configurar el mouse en la pantalla de configuración de mando presionando el ícono 'M'.
None (Disabled) = Ninguno (desactivado)
Off = No
On-screen touch controls = Controles táctiles en pantalla
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Desactivado
Off = Off
On-screen touch controls = Controis táctiles en pantalla
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = מקשי מגע על המסך
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = ךסמה לע עגמ ישקמ
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Ora ana (Ora Aktif)
Off = Mati
On-screen touch controls = Tombol Layar-sentuh
+1 -1
View File
@@ -170,7 +170,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = On-screen touch controls
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Nieko (išjungta)
Off = Off
On-screen touch controls = Ekrano liečiami kontrolės mygtukai
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Tetapan Tetikus
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = Kawalan sentuh di skrin
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
On-screen touch controls = Touch-kontroller på skjermen
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Setări Mouse
Mouse sensitivity = Sensitivitate Mouse
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
MouseControl Tip = You can map mouse inputs in the control mapping screen by pressing the 'M' icon.
None (Disabled) = Fara (dezactivat)
Off = Off
On-screen touch controls = Controale Touch pe Ecran
+1 -1
View File
@@ -157,7 +157,7 @@ Mouse = Musinställningar
Mouse sensitivity = Muskänslighet
Mouse smoothing = Musutjämning
Mouse wheel button-release delay = Släppfördröjning för knapp på mushjul
MouseControl Tip = Du kan nu mappa musrörelser genom att klicka på "M"-ikonen.
MouseControl Tip = Du kan mappa musrörelser genom att klicka på "M"-ikonen.
None (Disabled) = Ingen (av)
Off = Av
On-screen touch controls = Touch-kontroller på skärmen