diff --git a/src/common/progress_callback.cpp b/src/common/progress_callback.cpp index 0e8a43d3..88178a1e 100644 --- a/src/common/progress_callback.cpp +++ b/src/common/progress_callback.cpp @@ -188,10 +188,10 @@ void BaseProgressCallback::PopState() static_cast(((float)m_progress_value / (float)m_progress_range) * (float)state->progress_range) : state->progress_value; - SetCancellable(state->cancellable); - SetStatusText(state->status_text); - SetProgressRange(state->progress_range); - SetProgressValue(new_progress_value); + m_cancellable = state->cancellable; + m_status_text = std::move(state->status_text); + m_progress_range = state->progress_range; + m_progress_value = new_progress_value; m_base_progress_value = state->base_progress_value; m_saved_state = state->next_saved_state; diff --git a/src/core/bios.cpp b/src/core/bios.cpp index 2799e337..26b4de2b 100644 --- a/src/core/bios.cpp +++ b/src/core/bios.cpp @@ -246,7 +246,7 @@ bool IsValidPSExeHeader(const PSEXEHeader& header, u32 file_size) if (std::memcmp(header.id, expected_id, sizeof(expected_id)) != 0) return false; - if (header.file_size > (sizeof(PSEXEHeader) + file_size)) + if ((header.file_size + sizeof(PSEXEHeader)) > file_size) return false; return true; diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index a4fd3b4e..aaddad28 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -1913,7 +1913,18 @@ void CDROM::UpdatePhysicalPosition(bool update_logical) const u32 ticks = TimingEvents::GetGlobalTickCounter(); if (IsSeeking() || IsReadingOrPlaying() || !m_secondary_status.motor_on) { - // set by the event + // If we're seeking+reading the first sector (no stat bits set), we need to return the set/current lba, not the last + // physical LBA. Failing to do so may result in a track-jumped position getting returned in GetlocP, which causes + // Mad Panic Coaster to go into a seek+play loop. + if ((m_secondary_status.bits & (STAT_READING | STAT_PLAYING_CDDA | STAT_MOTOR_ON)) == STAT_MOTOR_ON && + m_current_lba != m_physical_lba) + { + Log_WarningPrintf("Jumping to hold position [%u->%u] while %s first sector", m_physical_lba, m_current_lba, + (m_drive_state == DriveState::Reading) ? "reading" : "playing"); + SetHoldPosition(m_current_lba, true); + } + + // Otherwise, this gets updated by the read event. return; } diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index 3de820f2..3b6195e9 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -453,25 +453,6 @@ bool HostInterface::SaveState(const char* filename) return result; } -void HostInterface::OnSystemCreated() {} - -void HostInterface::OnSystemPaused(bool paused) {} - -void HostInterface::OnSystemDestroyed() {} - -void HostInterface::OnSystemPerformanceCountersUpdated() {} - -void HostInterface::OnDisplayInvalidated() {} - -void HostInterface::OnSystemStateSaved(bool global, s32 slot) {} - -void HostInterface::OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code, - const std::string& game_title) -{ -} - -void HostInterface::OnControllerTypeChanged(u32 slot) {} - std::string HostInterface::GetShaderCacheBasePath() const { return GetUserDirectoryRelativePath("cache/"); @@ -1194,13 +1175,3 @@ void HostInterface::RecreateSystem() System::ResetThrottler(); OnDisplayInvalidated(); } - -void HostInterface::SetMouseMode(bool relative, bool hide_cursor) {} - -void HostInterface::DisplayLoadingScreen(const char* message, int progress_min /*= -1*/, int progress_max /*= -1*/, - int progress_value /*= -1*/) -{ - Log_InfoPrintf("Loading: %s %d of %d-%d", message, progress_value, progress_min, progress_max); -} - -void HostInterface::GetGameInfo(const char* path, CDImage* image, std::string* code, std::string* title) {} diff --git a/src/core/host_interface.h b/src/core/host_interface.h index 0b03a90f..bf606b99 100644 --- a/src/core/host_interface.h +++ b/src/core/host_interface.h @@ -88,10 +88,10 @@ public: /// Displays a loading screen with the logo, rendered with ImGui. Use when executing possibly-time-consuming tasks /// such as compiling shaders when starting up. virtual void DisplayLoadingScreen(const char* message, int progress_min = -1, int progress_max = -1, - int progress_value = -1); + int progress_value = -1) = 0; /// Retrieves information about specified game from game list. - virtual void GetGameInfo(const char* path, CDImage* image, std::string* code, std::string* title); + virtual void GetGameInfo(const char* path, CDImage* image, std::string* code, std::string* title) = 0; /// Returns the directory where per-game memory cards will be saved. virtual std::string GetMemoryCardDirectory() const; @@ -147,11 +147,11 @@ public: virtual std::unique_ptr OpenPackageFile(const char* path, u32 flags) = 0; virtual void OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code, - const std::string& game_title); - virtual void OnSystemPerformanceCountersUpdated(); + const std::string& game_title) = 0; + virtual void OnSystemPerformanceCountersUpdated() = 0; /// Called when the display is invalidated (e.g. a state is loaded). - virtual void OnDisplayInvalidated(); + virtual void OnDisplayInvalidated() = 0; protected: virtual bool AcquireHostDisplay() = 0; @@ -159,11 +159,10 @@ protected: virtual std::unique_ptr CreateAudioStream(AudioBackend backend) = 0; virtual s32 GetAudioOutputVolume() const; - virtual void OnSystemCreated(); - virtual void OnSystemPaused(bool paused); - virtual void OnSystemDestroyed(); - virtual void OnSystemStateSaved(bool global, s32 slot); - virtual void OnControllerTypeChanged(u32 slot); + virtual void OnSystemCreated() = 0; + virtual void OnSystemPaused(bool paused) = 0; + virtual void OnSystemDestroyed() = 0; + virtual void OnControllerTypeChanged(u32 slot) = 0; /// Restores all settings to defaults. virtual void SetDefaultSettings(SettingsInterface& si); @@ -184,7 +183,7 @@ protected: virtual void RecreateSystem(); /// Enables "relative" mouse mode, locking the cursor position and returning relative coordinates. - virtual void SetMouseMode(bool relative, bool hide_cursor); + virtual void SetMouseMode(bool relative, bool hide_cursor) = 0; /// Call when host display size changes, use with "match display" aspect ratio setting. virtual void OnHostDisplayResized(); diff --git a/src/duckstation-nogui/nogui_host_interface.cpp b/src/duckstation-nogui/nogui_host_interface.cpp index 638af4ea..403be749 100644 --- a/src/duckstation-nogui/nogui_host_interface.cpp +++ b/src/duckstation-nogui/nogui_host_interface.cpp @@ -89,6 +89,10 @@ void NoGUIHostInterface::SetDefaultSettings(SettingsInterface& si) si.SetStringValue("Hotkeys", "OpenQuickMenu", "Keyboard/Escape"); } +void NoGUIHostInterface::OnDisplayInvalidated() {} + +void NoGUIHostInterface::OnSystemPerformanceCountersUpdated() {} + bool NoGUIHostInterface::CreateDisplay(bool fullscreen) { std::optional wi = GetPlatformWindowInfo(); diff --git a/src/duckstation-nogui/nogui_host_interface.h b/src/duckstation-nogui/nogui_host_interface.h index cfda03ff..a2a01222 100644 --- a/src/duckstation-nogui/nogui_host_interface.h +++ b/src/duckstation-nogui/nogui_host_interface.h @@ -31,6 +31,9 @@ public: void RunLater(std::function callback) override; + virtual void OnDisplayInvalidated() override; + virtual void OnSystemPerformanceCountersUpdated() override; + protected: enum : u32 { diff --git a/src/duckstation-nogui/sdl_host_interface.cpp b/src/duckstation-nogui/sdl_host_interface.cpp index ccd935f5..37f1a4ca 100644 --- a/src/duckstation-nogui/sdl_host_interface.cpp +++ b/src/duckstation-nogui/sdl_host_interface.cpp @@ -260,6 +260,8 @@ std::optional SDLHostInterface::GetHostKeyCode return static_cast(*code); } +void SDLHostInterface::SetMouseMode(bool relative, bool hide_cursor) {} + void SDLHostInterface::PollAndUpdate() { // Process SDL events before the controller interface can steal them. diff --git a/src/duckstation-nogui/sdl_host_interface.h b/src/duckstation-nogui/sdl_host_interface.h index 6eece50b..7ac5dbda 100644 --- a/src/duckstation-nogui/sdl_host_interface.h +++ b/src/duckstation-nogui/sdl_host_interface.h @@ -21,6 +21,8 @@ public: bool SetFullscreen(bool enabled) override; protected: + void SetMouseMode(bool relative, bool hide_cursor) override; + void PollAndUpdate() override; std::optional GetHostKeyCode(const std::string_view key_code) const override; diff --git a/src/duckstation-nogui/vty_host_interface.cpp b/src/duckstation-nogui/vty_host_interface.cpp index aa753e7d..9b7b5a23 100644 --- a/src/duckstation-nogui/vty_host_interface.cpp +++ b/src/duckstation-nogui/vty_host_interface.cpp @@ -111,6 +111,8 @@ void VTYHostInterface::PollAndUpdate() NoGUIHostInterface::PollAndUpdate(); } +void VTYHostInterface::SetMouseMode(bool relative, bool hide_cursor) {} + void VTYHostInterface::OpenEVDevFDs() { for (int i = 0; i < 1000; i++) diff --git a/src/duckstation-nogui/vty_host_interface.h b/src/duckstation-nogui/vty_host_interface.h index e18841e1..169d665a 100644 --- a/src/duckstation-nogui/vty_host_interface.h +++ b/src/duckstation-nogui/vty_host_interface.h @@ -29,6 +29,8 @@ protected: void PollAndUpdate() override; + void SetMouseMode(bool relative, bool hide_cursor) override; + private: static void SIGTERMHandler(int sig); diff --git a/src/duckstation-nogui/win32_host_interface.cpp b/src/duckstation-nogui/win32_host_interface.cpp index 27ebe9ee..51f99d48 100644 --- a/src/duckstation-nogui/win32_host_interface.cpp +++ b/src/duckstation-nogui/win32_host_interface.cpp @@ -57,6 +57,8 @@ bool Win32HostInterface::RegisterWindowClass() return true; } +void Win32HostInterface::SetMouseMode(bool relative, bool hide_cursor) {} + bool Win32HostInterface::CreatePlatformWindow() { m_hwnd = CreateWindowExW(WS_EX_CLIENTEDGE, WINDOW_CLASS_NAME, L"DuckStation", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, diff --git a/src/duckstation-nogui/win32_host_interface.h b/src/duckstation-nogui/win32_host_interface.h index c25a067e..86bc60cb 100644 --- a/src/duckstation-nogui/win32_host_interface.h +++ b/src/duckstation-nogui/win32_host_interface.h @@ -16,6 +16,8 @@ public: static std::unique_ptr Create(); protected: + void SetMouseMode(bool relative, bool hide_cursor) override; + bool CreatePlatformWindow() override; void DestroyPlatformWindow() override; std::optional GetPlatformWindowInfo() override; diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index 80522783..b43fb131 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -784,8 +784,6 @@ void QtHostInterface::OnSystemDestroyed() void QtHostInterface::OnSystemPerformanceCountersUpdated() { - HostInterface::OnSystemPerformanceCountersUpdated(); - GPURenderer renderer = GPURenderer::Count; u32 render_width = 0; u32 render_height = 0; diff --git a/src/duckstation-qt/translations/duckstation-qt_pt-br.ts b/src/duckstation-qt/translations/duckstation-qt_pt-br.ts index 21c8e1ef..8acfd6f4 100644 --- a/src/duckstation-qt/translations/duckstation-qt_pt-br.ts +++ b/src/duckstation-qt/translations/duckstation-qt_pt-br.ts @@ -1953,17 +1953,17 @@ Token gerado %2. Cheats - + Gameshark Gameshark - + Manual Manual - + Automatic (Frame End) Automático (quadro final) @@ -2013,17 +2013,17 @@ Token gerado %2. CommonHostInterface - + Are you sure you want to stop emulation? Tem certeza de que deseja parar a emulação? - + The current state will be saved. O estado atual será salvo. - + Invalid version %u (%s version %u) Versão inválida %u (%s versão %u) @@ -5046,7 +5046,7 @@ This will download approximately 4 megabytes over your current internet connecti Configurações Personalizadas - + Force 4:3 For 24-Bit Display (disable widescreen for FMVs) Forçar 4:3 (desativa efeito esticado em FMVs) @@ -5055,107 +5055,107 @@ This will download approximately 4 megabytes over your current internet connecti Configurações da GPU - + Crop Mode: Modo de corte: - + Aspect Ratio: Proporção e aspecto: - + User Settings (Console) Configurações do usuário (console) - + CPU Clock Speed Control Controle de velocidade do CPU (Overclock) - + Enable Clock Speed Control (Overclocking/Underclocking) Ativar aumento de velocidade do CPU (Overclock) - + 100% (effective 33.3mhz) 100% (eficaz 33.3mhz) - + Enable 8MB RAM (Dev Console) Ativar 8MB RAM (modo console de desenvolvedor) - + GPU Screen Display Modo de exibição GPU - + : : - + Downsampling: Suavização da imagem: - + Linear Upscaling Escalonamento linear - + Integer Upscaling Escalonamento integro - + Renderer: Renderizador: - + GPU Enhancements Melhorias GPU - + Resolution Scale: Escala de Resolução: - + Multisample Antialiasing: Filtro anti-serrilhado (MSAA): - + Texture Filtering: Filtro de textura: - + True Color Rendering (24-bit, disables dithering) Renderização em (24 cores, desativa dithering) - + Scaled Dithering (scale dither pattern to resolution) Dithering escalonado, (escalona o padrão do dithering para a resolução) - + Widescreen Hack Melhoria para telas panorâmicas - + Force NTSC Timings (60hz-on-PAL) Força o temporizador NTSC (60hz jogos EU) @@ -5164,343 +5164,356 @@ This will download approximately 4 megabytes over your current internet connecti Filtragem de Textura Bilinear - + PGXP Geometry Correction PGXP correção geométrica - + PGXP Preserve Projection Precision Preservar precisão e projeção do PGXP - + PGXP Depth Buffer PGXP (buffer de profundidade) - + Other Settings Outras configurações - + + Status + Situação + + + + Revision: + Revisão: + + + CD-ROM Read Speedup: Velocidade de leitura CD-ROM: - + None (Double Speed) 2x (roda a 2X) - + 2x (Quad Speed) 2x (quadruplicado) - + 3x (6x Speed) 3x (6X de velocidade) - + 4x (8x Speed) 4x (8X de velocidade) - + 5x (10x Speed) 5x (10X de velocidade) - + 6x (12x Speed) 6x (12X de velocidade) - + 7x (14x Speed) 7x (14X de velocidade) - + 8x (16x Speed) 8x (16X de velocidade) - + 9x (18x Speed) 9x (18X de velocidade) - + 10x (20x Speed) 10x (20X de velocidade) - + CD-ROM Seek Speedup: Velocidade de busca CD-ROM: - + Infinite/Instantaneous Infinita/Instantânea - + None (Normal Speed) Nenhuma (velocidade normal) - + 2x 2x - + 3x 3x - + 4x 4x - + 5x 5x - + 6x 6x - + 7x 7x - + 8x 8x - + 9x 9x - + 10x 10x > (10240x5120) - + Runahead Frames: Avanço de quadros: - + Disabled Desativado - + 1 Frame 1 quadro - + 2 Frames 2 quadros - + 3 Frames 3 quadros - + 4 Frames 4 quadros - + 5 Frames 5 quadros - + 6 Frames 6 quadros - + 7 Frames 7 quadros - + 8 Frames 8 quadros - + 9 Frames 9 quadros - + 10 Frames 10 quadros - + User Settings (Graphics) Configurações do usuário (gráficos) - + User Settings (Input) Tipo de controle - + Controller Settings Configurações de controle - + Controller 1 Type: Opção controle 1: - + Controller 2 Type: Opção controle 2: - + Input Profile For Bindings: Perfil do controle: - + Multitap Mode: Modo multitap: - + Memory Card Settings Cartões de memória - + Memory Card 1 Type: Cartão de memória tipo 1: - + Memory Card 1 Shared Path: Cartão de memória 1 caminho do compartilhamento: - - + + Browse... Procurar... - + Memory Card 2 Type: Cartão de memória tipo 2: - + Memory Card 2 Shared Path: Cartão de memória 2 caminho do compartilhamento: - + Compatibility Settings Configurações de compatibilidade - + Traits Características individuais - + Overrides Sobreposições - + Display Active Offset: Opções de deslocamento: - + Display Line Offset: Deslocamento de linha: - + DMA Max Slice Ticks: DMA Max Slice Ticks: - + DMA Halt Ticks: DMA Halt Ticks: - + GPU FIFO Size: GPU FIFO Size: - + GPU Max Run Ahead: GPU Max run ahead: - + PGXP Geometry Tolerance: Tolerância geométrica do PGXP: - + PGXP Depth Threshold: Limite modo PGXP eixo Z: - - Compute Hashes + + Compute && Verify Hashes Calcular valores - - Verify Dump - Validar jogo + Compute Hashes + Calcular valores - + Verify Dump + Validar jogo + + + Export Compatibility Info Exportar informação de compatibilidade - + Close Fechar - + Game Properties - %1 Propriedades do jogo - %1 @@ -5509,53 +5522,62 @@ This will download approximately 4 megabytes over your current internet connecti %1 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + (unchanged) (inalterado) - + + <not verified> + <não verificado> + + + <not computed> <Não Calculado> - - + + Select path to memory card image Escolha o caminho para os cartões de memória - + %1% (%2MHz) %1% (%2MHz) - - Not yet implemented - Ainda não implementado + + Search on Redump.org + Procurar em Redump.org - + Not yet implemented + Ainda não implementado + + + Compatibility Info Export Exportar informações de compatibilidade - + Press OK to copy to clipboard. Pressione OK para copiar para a área de transferência. @@ -6037,434 +6059,434 @@ This will download approximately 4 megabytes over your current internet connecti Hotkeys - - - - - - - - - - - + + + + + + + + + + + General Geral - + Open Quick Menu Abrir menu rápido - + Fast Forward Avanço rápido - + Toggle Fast Forward Alternar pulo de quadros - + Turbo Turbo - + Toggle Turbo Alternar turbo - + Toggle Fullscreen Alternar para o modo tela cheia - + Toggle Pause Alternar pausa - + Toggle Cheats Alternar trapaças - + Power Off System Desligar o sistema - + Toggle Patch Codes Alternar códigos de trapaça - + Reset System Reiniciar o sistema - + Save Screenshot Salvar captura de tela - + Change Disc Mudar disco - + Frame Step Pulo de quadro - + Rewind Rebobinar - + Toggle Clock Speed Control (Overclocking) Alternar controle de velocidade CPU - - - - - - - - - - + + + + + + + + + + Graphics Gráficos - + Toggle Software Rendering Alternar para renderizador por software - + Toggle PGXP Alternar PGXP - + Toggle PGXP Depth Buffer Alternar PGXP modo eixo Z - + Increase Resolution Scale Aumentar escala de resolução - + Open Achievement List Abrir lista de conquistas - + Open Leaderboard List Abrir lista de classificação - - - - - - - - + + + + + + + + System Sistema - + Swap Memory Card Slots Trocar portas do cartão de memória - + Decrease Resolution Scale Diminuir escala de resolução - + Toggle Post-Processing Alternar pós-processamento - + Reload Post Processing Shaders Recarregar pós-processamento - + Reload Texture Replacements Recarregar texturas customizadas - + Toggle Widescreen Alternar tela panorâmica - + Toggle PGXP CPU Mode Alternar PGXP modo CPU - - - - - - - - - + + + + + + + + + Save States Estados salvos - + Load From Selected Slot Carregar do estado salvo - + Save To Selected Slot Salvar para compartimento selecionado - + Select Previous Save Slot Selecionar compartimento anterior - + Select Next Save Slot Selecionar próximo compartimento - + Undo Load State Desfazer carregar estado - + Load Game State 1 Carregar estado 1 - + Load Game State 2 Carregar estado 2 - + Load Game State 3 Carregar estado 3 - + Load Game State 4 Carregar estado 4 - + Load Game State 5 Carregar estado 5 - + Load Game State 6 Carregar estado 6 - + Load Game State 7 Carregar estado 7 - + Load Game State 8 Carregar estado 8 - + Load Game State 9 Carregar estado 9 - + Load Game State 10 Carregar estado 10 - + Save Game State 1 Salvar estado 1 - + Save Game State 2 Salvar estado 2 - + Save Game State 3 Salvar estado 3 - + Save Game State 4 Salvar estado 4 - + Save Game State 5 Salvar estado 5 - + Save Game State 6 Salvar estado 6 - + Save Game State 7 Salvar estado 7 - + Save Game State 8 Salvar estado 8 - + Save Game State 9 Salvar estado 9 - + Save Game State 10 Salvar estado 10 - + Load Global State 1 Carregar estado global 1 - + Load Global State 2 Carregar estado global 2 - + Load Global State 3 Carregar estado global 3 - + Load Global State 4 Carregar estado global 4 - + Load Global State 5 Carregar estado global 5 - + Load Global State 6 Carregar estado global 6 - + Load Global State 7 Carregar estado global 7 - + Load Global State 8 Carregar estado global 8 - + Load Global State 9 Carregar estado global 9 - + Load Global State 10 Carregar estado global 10 - + Save Global State 1 Salvar estado global 1 - + Save Global State 2 Salvar estado global 2 - + Save Global State 3 Salvar estado global 3 - + Save Global State 4 Salvar estado global 4 - + Save Global State 5 Salvar estado global 5 - + Save Global State 6 Salvar estado global 6 - + Save Global State 7 Salvar estado global 7 - + Save Global State 8 Salvar estado global 8 - + Save Global State 9 Salvar estado global 9 - + Save Global State 10 Salvar estado global 10 - - - - + + + + Audio Áudio @@ -6485,22 +6507,22 @@ This will download approximately 4 megabytes over your current internet connecti Salvar Estado Global %u - + Toggle Mute Alternar mudo - + Toggle CD Audio Mute Alternar silenciar áudio de CD - + Volume Up Volume + - + Volume Down Volume - @@ -7691,7 +7713,7 @@ Tem certeza de que deseja continuar? MemoryCardSettingsWidget - + All Memory Card Types (*.mcd *.mcr *.mc) Todos os tipos de cartão de memória (*.mcd *.mcr *.mc) @@ -8088,8 +8110,8 @@ Tem certeza de que deseja continuar? - - + + Failed to load post processing shader chain. Falha ao carregar shader escolhido. @@ -8102,7 +8124,7 @@ Tem certeza de que deseja continuar? Limitador de Velocidade Desativado. - + %n cheats are now active. %n trapaças agora estão ativos. @@ -8110,7 +8132,7 @@ Tem certeza de que deseja continuar? - + %n cheats are now inactive. %n trapaças agora estão inativos. @@ -8118,37 +8140,37 @@ Tem certeza de que deseja continuar? - + CPU clock speed control enabled (%u%% / %.3f MHz). Controle de velocidade do CPU ativada (%u%% / %.3f MHz). - + CPU clock speed control disabled (%.3f MHz). Controle de velocidade do CPU desativada (%.3f MHz). - + PGXP is now enabled. PGXP ligado. - + PGXP is now disabled. PGXP desligado. - + PGXP Depth Buffer is now enabled. PGXP modo eixo Z desligado. - + PGXP Depth Buffer is now disabled. PGXP modo eixo Z desligado. - + Texture replacements reloaded. Texturas personalizadas recarregadas. @@ -8158,111 +8180,111 @@ Tem certeza de que deseja continuar? Falha ao desfazer carregar estado. - + Rewinding is not enabled. O retrocesso não está habilitado. - + Achievements are disabled or unavailable for this game. As conquistas estão desativadas ou indisponíveis para este jogo. - + Leaderboards are disabled or unavailable for this game. As listas de classificação estão desativadas ou indisponíveis para este jogo. - + PGXP CPU mode is now enabled. PGXP modo CPU ligado. - + PGXP CPU mode is now disabled. PGXP modo CPU desligado. - + Volume: Muted Volume: silenciado - - - + + + Volume: %d%% Volume: %d%% - + CD Audio Muted. Áudio do CD silenciado. - + CD Audio Unmuted. Áudio do CD religado. - + Loaded input profile from '%s' Perfil de controle carregado de '%s' - + Started dumping audio to '%s'. Iniciado despejo de áudio em '%s'. - + Failed to start dumping audio to '%s'. Falha ao iniciar despejo de áudio em '%s'. - + Stopped dumping audio. Despejo de áudio terminado. - + Screenshot file '%s' already exists. Captura de tela '%s' já existe. - + Failed to save screenshot to '%s' Falha ao salvar captura em '%s' - + Screenshot saved to '%s'. Captura de tela salva em '%s'. - + Controller in port %u (%s) is not supported for %s. Supported controllers: %s Please configure a supported controller from the list above. Controle na porta %u (%s) não compatível com %s.controles compatíveis: %s configure um controle compatível conforme mostrado. - + Input profile '%s' cannot be found. Perfil de controle '%s' não encontrado. - + Using input profile '%s'. Usando perfil de controle '%s'. - + Failed to load cheats from '%s'. Falha ao carregar '%s' trapaças. - + %n cheats are enabled. This may result in instability. %n trapaças ativadas. Isso pode resultar em instabilidade. @@ -8270,32 +8292,32 @@ Please configure a supported controller from the list above. - + Widescreen hack is now enabled, and aspect ratio is set to %s. Ajuste de tela panorâmica ligado, e a proporção da imagem está definida como %s. - + Widescreen hack is now disabled, and aspect ratio is set to %s. Ajuste de tela panorâmica desligado, e a proporção da imagem está definida como %s. - + Swapped memory card ports. Both ports have a memory card. Portas de cartão de memória trocadas. ambas já contém cartão. - + Swapped memory card ports. Port 2 has a memory card, Port 1 is empty. Portas de cartão de memória trocadas. porta 2 tem um cartão de memória, porta 1 vazia. - + Swapped memory card ports. Port 1 has a memory card, Port 2 is empty. Portas de cartão de memória trocadas. porta 1 tem um cartão de memória, porta 2 vazia. - + Swapped memory card ports. Neither port has a memory card. Portas de cartão de memória trocadas. nenhuma das portas possui cartão de memória. @@ -8312,27 +8334,27 @@ Please configure a supported controller from the list above. Trapaça %u.salva para '%s'. - + Deleted cheat list '%s'. Trapaça '%s' apagada da lista. - + Cheat '%s' enabled. Trapaça '%s' ativada. - + Cheat '%s' disabled. Trapaça '%s' desativada. - + Failed to save cheat list to '%s' Falha ao salvar lista de trapaças para '%s' - + No cheats are loaded. Nenhuma trapaça foi carregada. @@ -8361,17 +8383,17 @@ Please configure a supported controller from the list above. Turbo desligado. - + Hotkey unavailable because achievements hardcore mode is active. Atalho desativado modo dificílimo ligado. - + Rewinding... Rebobinando... - + Stopped rewinding. Retrocesso terminado. @@ -8397,7 +8419,7 @@ Please configure a supported controller from the list above. - + Saved %n cheats to '%s'. Salvo %n trapaça em '%s'. @@ -8405,32 +8427,32 @@ Please configure a supported controller from the list above. - + Applied cheat '%s'. Trapaça aplicada '%s'. - + Cheat '%s' is already enabled. Trapaça '%s' já está ativada - + Post-processing is now enabled. Pós-processamento ligado. - + Post-processing is now disabled. Pós-processamento desligado. - + Failed to load post-processing shader chain. Falha ao carregar texturas de pós-processamento. - + Post-processing shaders reloaded. Texturas de pós-processamento recarregadas. @@ -9127,22 +9149,22 @@ The saves will not be recoverable. DuckStation - + Cancel Cancelar - + Error Erro - + Question - + Information Informação diff --git a/src/duckstation-qt/translations/duckstation-qt_zh-cn.ts b/src/duckstation-qt/translations/duckstation-qt_zh-cn.ts index c9017561..a1f3c0b0 100644 --- a/src/duckstation-qt/translations/duckstation-qt_zh-cn.ts +++ b/src/duckstation-qt/translations/duckstation-qt_zh-cn.ts @@ -1999,17 +1999,17 @@ Login token generated on %2. CommonHostInterface - + Are you sure you want to stop emulation? 您确定要停止模拟吗? - + The current state will be saved. 当前进度将会保存。 - + Invalid version %u (%s version %u) 无效版本%u (%s版本%u) @@ -4717,307 +4717,322 @@ This will download approximately 4 megabytes over your current internet connecti 哈希 - + + Status + 状态 + + + + Revision: + 修订: + + + User Settings (Console) 用户设置 (操纵台) - + 100% (effective 33.3mhz) 100% (有效性33.3mhz) - + Enable 8MB RAM (Dev Console) 启用8MB内存 (开发操纵台) - + CD-ROM Seek Speedup: CD-ROM寻道加速: - + Infinite/Instantaneous 无限的/瞬时的 - + None (Normal Speed) 无 (正常速度) - + 2x 2x - + 3x 3x - + 4x 4x - + 5x 5x - + 6x 6x - + 7x 7x - + 8x 8x - + 9x 9x - + 10x 10x - + User Settings (Graphics) 用户设置 (图形) - + : : - + Downsampling: 缩减采样: - + Renderer: 渲染器: - + Multisample Antialiasing: 多重采样反锯齿: - + PGXP Preserve Projection Precision PGXP保持投影精度 - + PGXP Depth Buffer PGXP深度缓冲 - + + Compute && Verify Hashes + 计算 && 验证哈希 + + + Other Settings 其他设置 - + CD-ROM Read Speedup: CD-ROM读取加速: - + None (Double Speed) 无 (2倍速) - + 2x (Quad Speed) 2x (4倍速) - + 3x (6x Speed) 3x (6倍速) - + 4x (8x Speed) 4x (8倍速) - + 5x (10x Speed) 5x (10倍速) - + 6x (12x Speed) 6x (12倍速) - + 7x (14x Speed) 7x (14倍速) - + 8x (16x Speed) 8x (16倍速) - + 9x (18x Speed) 9x (18倍速) - + 10x (20x Speed) 10x (20倍速) - + Runahead Frames: 预运行帧: - + Disabled 禁用 - + 1 Frame 1帧 - + 2 Frames 2帧 - + 3 Frames 3帧 - + 4 Frames 4帧 - + 5 Frames 5帧 - + 6 Frames 6帧 - + 7 Frames 7帧 - + 8 Frames 8帧 - + 9 Frames 9帧 - + 10 Frames 10帧 - + User Settings (Input) 用户设置 (输入) - + CPU Clock Speed Control CPU速率控制 - + Enable Clock Speed Control (Overclocking/Underclocking) 启用速率控制 (超频/降频) - + GPU Screen Display GPU屏幕显示 - + Aspect Ratio: 高宽比: - + Crop Mode: 裁剪模式: - + Linear Upscaling 线性提升缩放 - + Integer Upscaling 整数提升缩放 - + GPU Enhancements GPU增强 - + Resolution Scale: 分辨率比率: - + Texture Filtering: 纹理过滤器: - + True Color Rendering (24-bit, disables dithering) 真彩色渲染 (24位色,禁用色彩抖动) - + Scaled Dithering (scale dither pattern to resolution) 缩放色彩抖动 (缩放色彩抖动图案到分辨率) - + Force NTSC Timings (60hz-on-PAL) 强制NTSC计时 (60hz-PAL) - + Force 4:3 For 24-Bit Display (disable widescreen for FMVs) 强制24位色显示4:3 (动画播放禁用宽屏) @@ -5026,148 +5041,146 @@ This will download approximately 4 megabytes over your current internet connecti 双线性纹理过滤 - + Widescreen Hack 宽屏调整 - + PGXP Geometry Correction PGXP几何校正 - + Controller Settings 控制器设置 - + Controller 1 Type: 控制器1类型: - + Controller 2 Type: 控制器2类型: - + Input Profile For Bindings: 绑定输入配置文件: - + Memory Card Settings 记忆卡设置 - + Memory Card 1 Type: 记忆卡1类型: - + Memory Card 1 Shared Path: 共用记忆卡1路径: - + Memory Card 2 Type: 记忆卡2类型: - + Memory Card 2 Shared Path: 共用记忆卡2路径: - - + + Browse... 浏览... - + Multitap Mode: 多插口模式: - + Compatibility Settings 兼容性设置 - + Traits 特征 - + Overrides 覆盖 - + Display Active Offset: 显示活动偏移: - + Display Line Offset: 显示线偏移: - + DMA Max Slice Ticks: DMA最大片段计时: - + DMA Halt Ticks: DMA停顿计时: - + GPU FIFO Size: GPU的FIFO大小: - + GPU Max Run Ahead: GPU最大预运行: - + PGXP Geometry Tolerance: PGXP几何公差: - + PGXP Depth Threshold: PGXP深度阈值: - Compute Hashes - 计算哈希 + 计算哈希 - Verify Dump - 验证转储 + 验证转储 - + Export Compatibility Info 导出兼容性信息 - + Close 关闭 - + Game Properties - %1 游戏属性 - %1 @@ -5176,53 +5189,62 @@ This will download approximately 4 megabytes over your current internet connecti %1 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + (unchanged) - (不变更) + (未变更) - + + <not verified> + <未验证> + + + <not computed> - <不兼容> + <未计算> - - + + Select path to memory card image 选择记忆卡文件的路径 - + %1% (%2MHz) %1% (%2MHz) - - Not yet implemented - 尚未实施 + + Search on Redump.org + 在Redump.org上搜索 - + Not yet implemented + 尚未实施 + + + Compatibility Info Export 兼容性信息导出 - + Press OK to copy to clipboard. 按“确定”复制到剪贴板。 @@ -5644,434 +5666,434 @@ This will download approximately 4 megabytes over your current internet connecti Hotkeys - - - - - - - - - - - + + + + + + + + + + + General 常规 - + Open Quick Menu 打开快捷菜单 - + Fast Forward 快进 - + Toggle Fast Forward 快进开关 - + Turbo 涡轮 - + Toggle Turbo 涡轮开关 - + Toggle Fullscreen 全屏开关 - + Toggle Pause 暂停开关 - + Toggle Cheats 金手指开关 - + Power Off System 关机 - + Toggle Patch Codes 补丁代码开关 - + Reset System 重启系统 - + Save Screenshot 保存截图 - + Change Disc 更换光盘 - + Frame Step 帧进 - + Rewind 回退 - + Toggle Clock Speed Control (Overclocking) 速率控制开关 (超频) - - - - - - - - - - + + + + + + + + + + Graphics 图像 - + Toggle Software Rendering 软件渲染开关 - + Toggle PGXP PGXP开关 - + Toggle PGXP Depth Buffer PGXP深度缓冲开关 - + Increase Resolution Scale 提高分辨率比率 - + Open Achievement List 打开成就列表 - + Open Leaderboard List 打开排行榜列表 - - - - - - - - + + + + + + + + System 系统 - + Swap Memory Card Slots 交换记忆卡档位 - + Decrease Resolution Scale 降低分辨率比率 - + Toggle Post-Processing 后处理开关 - + Reload Post Processing Shaders 重新加载后处理着色器 - + Reload Texture Replacements 重新加载纹理替换 - + Toggle Widescreen 宽屏开关 - + Toggle PGXP CPU Mode PGXP下CPU模式开关 - - - - - - - - - + + + + + + + + + Save States 读档/存档 - + Load From Selected Slot 从所选档位读取 - + Save To Selected Slot 保存到所选档位 - + Select Previous Save Slot 选择前一个档位 - + Select Next Save Slot 选择后一个档位 - + Undo Load State 撤消读档 - + Load Game State 1 读取游戏档1 - + Load Game State 2 读取游戏档2 - + Load Game State 3 读取游戏档3 - + Load Game State 4 读取游戏档4 - + Load Game State 5 读取游戏档5 - + Load Game State 6 读取游戏档6 - + Load Game State 7 读取游戏档7 - + Load Game State 8 读取游戏档8 - + Load Game State 9 读取游戏档9 - + Load Game State 10 读取游戏档10 - + Save Game State 1 保存游戏档1 - + Save Game State 2 保存游戏档2 - + Save Game State 3 保存游戏档3 - + Save Game State 4 保存游戏档4 - + Save Game State 5 保存游戏档5 - + Save Game State 6 保存游戏档6 - + Save Game State 7 保存游戏档7 - + Save Game State 8 保存游戏档8 - + Save Game State 9 保存游戏档9 - + Save Game State 10 保存游戏档10 - + Load Global State 1 读取全局档1 - + Load Global State 2 读取全局档2 - + Load Global State 3 读取全局档3 - + Load Global State 4 读取全局档4 - + Load Global State 5 读取全局档5 - + Load Global State 6 读取全局档6 - + Load Global State 7 读取全局档7 - + Load Global State 8 读取全局档8 - + Load Global State 9 读取全局档9 - + Load Global State 10 读取全局档10 - + Save Global State 1 保存全局档1 - + Save Global State 2 保存全局档2 - + Save Global State 3 保存全局档3 - + Save Global State 4 保存全局档4 - + Save Global State 5 保存全局档5 - + Save Global State 6 保存全局档6 - + Save Global State 7 保存全局档7 - + Save Global State 8 保存全局档8 - + Save Global State 9 保存全局档9 - + Save Global State 10 保存全局档10 - - - - + + + + Audio 声音 @@ -6092,22 +6114,22 @@ This will download approximately 4 megabytes over your current internet connecti 保存全局状态 %u - + Toggle Mute 声音开关 - + Toggle CD Audio Mute 光盘音轨开关 - + Volume Up 音量增大 - + Volume Down 音量减小 @@ -7292,7 +7314,7 @@ Are you sure you want to continue? MemoryCardSettingsWidget - + All Memory Card Types (*.mcd *.mcr *.mc) 所有记忆卡类型 (*.mcd *.mcr *.mc) @@ -7685,8 +7707,8 @@ Are you sure you want to continue? - - + + Failed to load post processing shader chain. 无法加载后处理着色器链。 @@ -7699,51 +7721,51 @@ Are you sure you want to continue? 限速器禁用。 - + %n cheats are now active. %n金手指已激活。 - + %n cheats are now inactive. %n金手指未激活。 - + CPU clock speed control enabled (%u%% / %.3f MHz). CPU速率控制启用 (%u%% / %.3f MHz)。 - + CPU clock speed control disabled (%.3f MHz). CPU速率控制禁用 (%.3f MHz)。 - + PGXP is now enabled. PGXP已启用。 - + PGXP is now disabled. PGXP已禁用。 - + PGXP Depth Buffer is now enabled. PGXP深度缓冲已启用。 - + PGXP Depth Buffer is now disabled. PGXP深度缓冲已禁用。 - + Texture replacements reloaded. 纹理替换重新加载。 @@ -7753,89 +7775,89 @@ Are you sure you want to continue? 无法保存撤消的读档 - + Rewinding is not enabled. 回退未启用。 - + Achievements are disabled or unavailable for this game. 该游戏成就禁用或不可用。 - + Leaderboards are disabled or unavailable for this game. 该游戏排行榜禁用或不可用。 - + PGXP CPU mode is now enabled. PGXP下CPU模式已启用。 - + PGXP CPU mode is now disabled. PGXP下CPU模式已禁用。 - + Volume: Muted 音量: 静音 - - - + + + Volume: %d%% 音量: %d%% - + CD Audio Muted. 光盘音频已静音。 - + CD Audio Unmuted. 光盘音频已解除静音。 - + Loaded input profile from '%s' 从'%s'读取输入配置 - + Started dumping audio to '%s'. 开始转储音频到'%s'。 - + Failed to start dumping audio to '%s'. 无法开始转储音频到'%s'。 - + Stopped dumping audio. 停止转储音频。 - + Screenshot file '%s' already exists. 截图文件'%s'已经存在。 - + Failed to save screenshot to '%s' 无法保存截图到'%s' - + Screenshot saved to '%s'. 截图已保存到'%s'。 - + Controller in port %u (%s) is not supported for %s. Supported controllers: %s Please configure a supported controller from the list above. @@ -7844,54 +7866,54 @@ Please configure a supported controller from the list above. 请从上面的列表中配置一个支持的控制器。 - + Input profile '%s' cannot be found. 无法找到输入配置文件'%s'。 - + Using input profile '%s'. 使用输入配置'%s'。 - + Failed to load cheats from '%s'. 无法从'%s'加载金手指。 - + %n cheats are enabled. This may result in instability. %n金手指启用。这可能会导致不稳定。 - + Widescreen hack is now enabled, and aspect ratio is set to %s. 宽屏调整已启用,高宽比设置为%s。 - + Widescreen hack is now disabled, and aspect ratio is set to %s. 宽屏调整已禁用,高宽比设置为%s。 - + Swapped memory card ports. Both ports have a memory card. 交换记忆卡接口。两个接口都有记忆卡。 - + Swapped memory card ports. Port 2 has a memory card, Port 1 is empty. 交换记忆卡接口。接口2有一个记忆卡,接口1是空的。 - + Swapped memory card ports. Port 1 has a memory card, Port 2 is empty. 交换记忆卡接口。接口1有一个记忆卡,接口2是空的。 - + Swapped memory card ports. Neither port has a memory card. 交换记忆卡接口。两个接口都没有记忆卡。 @@ -7908,27 +7930,27 @@ Please configure a supported controller from the list above. 保存%u金手指到'%s'。 - + Deleted cheat list '%s'. 已删除的金手指列表'%s'。 - + Cheat '%s' enabled. 金手指'%s'启用。 - + Cheat '%s' disabled. 金手指'%s'禁用。 - + Failed to save cheat list to '%s' 无法保存金手指列表到'%s' - + No cheats are loaded. 没有载入金手指。 @@ -7957,17 +7979,17 @@ Please configure a supported controller from the list above. 停止涡轮... - + Hotkey unavailable because achievements hardcore mode is active. 无法使用热键因为成就硬核模式是激活的。 - + Rewinding... 回退... - + Stopped rewinding. 停止回退。 @@ -7990,39 +8012,39 @@ Please configure a supported controller from the list above. - + Saved %n cheats to '%s'. 保存%n金手指到'%s'。 - + Applied cheat '%s'. 应用金手指'%s'。 - + Cheat '%s' is already enabled. 金手指'%s'已启用。 - + Post-processing is now enabled. 后处理已启用。 - + Post-processing is now disabled. 后处理已禁用。 - + Failed to load post-processing shader chain. 无法加载后处理着色器链。 - + Post-processing shaders reloaded. 重新加载后处理着色器。 @@ -8722,22 +8744,22 @@ The saves will not be recoverable. DuckStation - + Cancel 取消 - + Error 错误 - + Question 问题 - + Information 信息 diff --git a/src/duckstation-regtest/regtest_host_interface.cpp b/src/duckstation-regtest/regtest_host_interface.cpp index d38b589f..8e8bce64 100644 --- a/src/duckstation-regtest/regtest_host_interface.cpp +++ b/src/duckstation-regtest/regtest_host_interface.cpp @@ -104,8 +104,6 @@ void RegTestHostInterface::GetGameInfo(const char* path, CDImage* image, std::st void RegTestHostInterface::OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code, const std::string& game_title) { - HostInterface::OnRunningGameChanged(path, image, game_code, game_title); - Log_InfoPrintf("Game Path: %s", path.c_str()); Log_InfoPrintf("Game Code: %s", game_code.c_str()); Log_InfoPrintf("Game Title: %s", game_title.c_str()); @@ -128,6 +126,10 @@ void RegTestHostInterface::OnRunningGameChanged(const std::string& path, CDImage UpdateSettings(); } +void RegTestHostInterface::OnSystemPerformanceCountersUpdated() {} + +void RegTestHostInterface::OnDisplayInvalidated() {} + std::string RegTestHostInterface::GetStringSettingValue(const char* section, const char* key, const char* default_value /*= ""*/) { @@ -284,6 +286,16 @@ std::unique_ptr RegTestHostInterface::CreateAudioStream(AudioBacken return AudioStream::CreateNullAudioStream(); } +void RegTestHostInterface::OnSystemCreated() {} + +void RegTestHostInterface::OnSystemPaused(bool paused) {} + +void RegTestHostInterface::OnSystemDestroyed() {} + +void RegTestHostInterface::OnControllerTypeChanged(u32 slot) {} + +void RegTestHostInterface::SetMouseMode(bool relative, bool hide_cursor) {} + static void PrintCommandLineVersion() { const bool was_console_enabled = Log::IsConsoleOutputEnabled(); diff --git a/src/duckstation-regtest/regtest_host_interface.h b/src/duckstation-regtest/regtest_host_interface.h index b2e98c6c..cb5626b6 100644 --- a/src/duckstation-regtest/regtest_host_interface.h +++ b/src/duckstation-regtest/regtest_host_interface.h @@ -2,7 +2,7 @@ #include "core/host_interface.h" #include "regtest_settings_interface.h" -class RegTestHostInterface : public HostInterface +class RegTestHostInterface final : public HostInterface { public: RegTestHostInterface(); @@ -34,12 +34,22 @@ public: std::unique_ptr OpenPackageFile(const char* path, u32 flags) override; + void OnSystemPerformanceCountersUpdated() override; + void OnDisplayInvalidated() override; + protected: bool AcquireHostDisplay() override; void ReleaseHostDisplay() override; std::unique_ptr CreateAudioStream(AudioBackend backend) override; + void OnSystemCreated() override; + void OnSystemPaused(bool paused) override; + void OnSystemDestroyed() override; + void OnControllerTypeChanged(u32 slot) override; + + void SetMouseMode(bool relative, bool hide_cursor) override; + private: void LoadGameSettingsDatabase(); void InitializeSettings(); diff --git a/src/duckstation-uwp/uwp_host_interface.cpp b/src/duckstation-uwp/uwp_host_interface.cpp index 147d2671..8bf4f38c 100644 --- a/src/duckstation-uwp/uwp_host_interface.cpp +++ b/src/duckstation-uwp/uwp_host_interface.cpp @@ -235,6 +235,10 @@ void UWPHostInterface::RequestExit() [this]() { winrt::Windows::ApplicationModel::Core::CoreApplication::Exit(); }); } +void UWPHostInterface::SetMouseMode(bool relative, bool hide_cursor) +{ +} + void UWPHostInterface::Run() { if (!Initialize()) @@ -383,6 +387,14 @@ void UWPHostInterface::RunLater(std::function callback) m_queued_callbacks.push_back(std::move(callback)); } +void UWPHostInterface::OnDisplayInvalidated() +{ +} + +void UWPHostInterface::OnSystemPerformanceCountersUpdated() +{ +} + bool UWPHostInterface::IsFullscreen() const { return m_appview.IsFullScreenMode(); diff --git a/src/duckstation-uwp/uwp_host_interface.h b/src/duckstation-uwp/uwp_host_interface.h index a0c2fc04..399a1449 100644 --- a/src/duckstation-uwp/uwp_host_interface.h +++ b/src/duckstation-uwp/uwp_host_interface.h @@ -47,6 +47,9 @@ public: void RunLater(std::function callback) override; + void OnDisplayInvalidated() override; + void OnSystemPerformanceCountersUpdated() override; + bool IsFullscreen() const override; bool SetFullscreen(bool enabled) override; @@ -74,6 +77,8 @@ protected: void PollAndUpdate() override; void RequestExit() override; + void SetMouseMode(bool relative, bool hide_cursor) override; + bool CreateDisplay(bool fullscreen); void DestroyDisplay(); void RunCallbacks(); diff --git a/src/frontend-common/common_host_interface.cpp b/src/frontend-common/common_host_interface.cpp index 400328ac..1c32a6d3 100644 --- a/src/frontend-common/common_host_interface.cpp +++ b/src/frontend-common/common_host_interface.cpp @@ -840,11 +840,7 @@ bool CommonHostInterface::SaveState(bool global, s32 slot) std::string save_path = global ? GetGlobalSaveStateFileName(slot) : GetGameSaveStateFileName(code.c_str(), slot); RenameCurrentSaveStateToBackup(save_path.c_str()); - if (!SaveState(save_path.c_str())) - return false; - - OnSystemStateSaved(global, slot); - return true; + return SaveState(save_path.c_str()); } bool CommonHostInterface::CanResumeSystemFromFile(const char* filename) @@ -1090,8 +1086,6 @@ void CommonHostInterface::SetUserDirectory() void CommonHostInterface::OnSystemCreated() { - HostInterface::OnSystemCreated(); - if (m_fullscreen_ui_enabled) FullscreenUI::SystemCreated(); @@ -1127,8 +1121,6 @@ void CommonHostInterface::OnSystemDestroyed() if (m_display) m_display->SetDisplayMaxFPS(0.0f); - HostInterface::OnSystemDestroyed(); - if (m_fullscreen_ui_enabled) FullscreenUI::SystemDestroyed(); @@ -1139,8 +1131,6 @@ void CommonHostInterface::OnSystemDestroyed() void CommonHostInterface::OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code, const std::string& game_title) { - HostInterface::OnRunningGameChanged(path, image, game_code, game_title); - if (g_settings.apply_game_settings) ApplySettings(true); @@ -1166,8 +1156,6 @@ void CommonHostInterface::OnRunningGameChanged(const std::string& path, CDImage* void CommonHostInterface::OnControllerTypeChanged(u32 slot) { - HostInterface::OnControllerTypeChanged(slot); - UpdateInputMap(); } @@ -2821,8 +2809,8 @@ bool CommonHostInterface::ApplyInputProfile(const char* profile_path) continue; } + // We don't need to call ControllerTypeChanged here because we're already updating the input map. g_settings.controller_types[controller_index - 1] = *ctype; - HostInterface::OnControllerTypeChanged(controller_index - 1); m_settings_interface->SetStringValue(section_name, "Type", Settings::GetControllerTypeName(*ctype)); diff --git a/src/frontend-common/d3d12_host_display.cpp b/src/frontend-common/d3d12_host_display.cpp index 4ae92e68..ecf05090 100644 --- a/src/frontend-common/d3d12_host_display.cpp +++ b/src/frontend-common/d3d12_host_display.cpp @@ -241,18 +241,7 @@ bool D3D12HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view return false; } -#if 0 - // we need the specific factory for the device, otherwise MakeWindowAssociation() is flaky. - ComPtr dxgi_device; - if (FAILED(m_device.As(&dxgi_device)) || FAILED(dxgi_device->GetParent(IID_PPV_ARGS(dxgi_adapter.GetAddressOf()))) || - FAILED(dxgi_adapter->GetParent(IID_PPV_ARGS(m_dxgi_factory.GetAddressOf())))) - { - Log_WarningPrint("Failed to get parent adapter/device/factory"); - return false; - } -#else m_dxgi_factory = std::move(temp_dxgi_factory); -#endif m_allow_tearing_supported = false; ComPtr dxgi_factory5;