diff --git a/src/core/game_database.cpp b/src/core/game_database.cpp index 5e3b40352..c2dbaf0ce 100644 --- a/src/core/game_database.cpp +++ b/src/core/game_database.cpp @@ -376,8 +376,6 @@ const char* GameDatabase::GetCompatibilityRatingDisplayName(CompatibilityRating void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_messages) const { - constexpr float osd_duration = Host::OSD_INFO_DURATION; - if (display_active_start_offset.has_value()) { settings.display_active_start_offset = display_active_start_offset.value(); @@ -457,14 +455,18 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes } } + SmallStackString<512> messages; +#define APPEND_MESSAGE(icon, msg) \ + do \ + { \ + messages.append("\n \u2022 "); \ + messages.append(msg); \ + } while (0) + if (HasTrait(Trait::ForceInterpreter)) { if (display_osd_messages && settings.cpu_execution_mode != CPUExecutionMode::Interpreter) - { - Host::AddIconOSDMessage("gamedb_force_interpreter", ICON_FA_MICROCHIP, - TRANSLATE_STR("OSDMessage", "CPU interpreter forced by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MICROCHIP, TRANSLATE_SV("GameDatabase", "CPU recompiler disabled.")); settings.cpu_execution_mode = CPUExecutionMode::Interpreter; } @@ -472,11 +474,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::ForceSoftwareRenderer)) { if (display_osd_messages && settings.gpu_renderer != GPURenderer::Software) - { - Host::AddIconOSDMessage("gamedb_force_software", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "Software renderer forced by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_PAINT_ROLLER, TRANSLATE_SV("GameDatabase", "Hardware rendering disabled.")); settings.gpu_renderer = GPURenderer::Software; } @@ -484,12 +482,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::ForceSoftwareRendererForReadbacks)) { if (display_osd_messages && settings.gpu_renderer != GPURenderer::Software) - { - Host::AddIconOSDMessage( - "gamedb_force_software_rb", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "Using software renderer for readbacks based on compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "Software renderer readbacks enabled.")); settings.gpu_use_software_renderer_for_readbacks = true; } @@ -502,11 +495,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::ForceInterlacing)) { if (display_osd_messages && settings.gpu_disable_interlacing) - { - Host::AddIconOSDMessage("gamedb_force_interlacing", ICON_FA_TV, - TRANSLATE_STR("OSDMessage", "Interlacing forced by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_TV, TRANSLATE_SV("GameDatabase", "Interlaced rendering enabled.")); settings.gpu_disable_interlacing = false; } @@ -514,11 +503,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisableTrueColor)) { if (display_osd_messages && settings.gpu_true_color) - { - Host::AddIconOSDMessage("gamedb_disable_true_color", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "True color disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "True color disabled.")); settings.gpu_true_color = false; } @@ -526,11 +511,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisableUpscaling)) { if (display_osd_messages && settings.gpu_resolution_scale > 1) - { - Host::AddIconOSDMessage("gamedb_disable_upscaling", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "Upscaling disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "Upscaling disabled.")); settings.gpu_resolution_scale = 1; } @@ -540,9 +521,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (display_osd_messages && (settings.gpu_texture_filter != GPUTextureFilter::Nearest || g_settings.gpu_sprite_texture_filter != GPUTextureFilter::Nearest)) { - Host::AddIconOSDMessage("gamedb_disable_upscaling", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "Texture filtering disabled by compatibility settings."), - osd_duration); + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "Texture filtering disabled.")); } settings.gpu_texture_filter = GPUTextureFilter::Nearest; @@ -552,11 +531,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisableScaledDithering)) { if (display_osd_messages && settings.gpu_scaled_dithering) - { - Host::AddIconOSDMessage("gamedb_disable_scaled_dithering", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "Scaled dithering disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "Scaled dithering.")); settings.gpu_scaled_dithering = false; } @@ -564,11 +539,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisableWidescreen)) { if (display_osd_messages && settings.gpu_widescreen_hack) - { - Host::AddIconOSDMessage("gamedb_disable_widescreen", ICON_FA_TV, - TRANSLATE_STR("OSDMessage", "Widescreen rendering disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_TV, TRANSLATE_SV("GameDatabase", "Widescreen rendering disabled.")); settings.gpu_widescreen_hack = false; } @@ -576,11 +547,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisableForceNTSCTimings)) { if (display_osd_messages && settings.gpu_force_ntsc_timings) - { - Host::AddIconOSDMessage("gamedb_disable_force_ntsc_timings", ICON_FA_TV, - TRANSLATE_STR("OSDMessage", "Forcing NTSC Timings disallowed by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_TV, TRANSLATE_SV("GameDatabase", "Force NTSC timings disabled.")); settings.gpu_force_ntsc_timings = false; } @@ -588,11 +555,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisablePGXP)) { if (display_osd_messages && settings.gpu_pgxp_enable) - { - Host::AddIconOSDMessage( - "gamedb_disable_pgxp", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP geometry correction disabled by compatibility settings."), osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP geometry correction disabled.")); settings.gpu_pgxp_enable = false; } @@ -600,11 +563,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisablePGXPCulling)) { if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_culling) - { - Host::AddIconOSDMessage("gamedb_disable_pgxp_culling", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP culling disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP culling correction disabled.")); settings.gpu_pgxp_culling = false; } @@ -612,12 +571,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisablePGXPTextureCorrection)) { if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_texture_correction) - { - Host::AddIconOSDMessage( - "gamedb_disable_pgxp_texture", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP perspective corrected textures disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP perspective correct textures disabled.")); settings.gpu_pgxp_texture_correction = false; } @@ -627,10 +581,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_texture_correction && settings.gpu_pgxp_color_correction) { - Host::AddIconOSDMessage( - "gamedb_disable_pgxp_texture", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP perspective corrected colors disabled by compatibility settings."), - osd_duration); + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP perspective correct colors disabled.")); } settings.gpu_pgxp_color_correction = false; @@ -639,12 +590,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisablePGXPPreserveProjFP)) { if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_preserve_proj_fp) - { - Host::AddIconOSDMessage( - "gamedb_disable_pgxp_texture", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP projection precision preservation disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP preserve projection precision disabled.")); settings.gpu_pgxp_preserve_proj_fp = false; } @@ -652,22 +598,18 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::ForcePGXPVertexCache)) { if (display_osd_messages && settings.gpu_pgxp_enable && !settings.gpu_pgxp_vertex_cache) - { - Host::AddIconOSDMessage("gamedb_force_pgxp_vertex_cache", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP vertex cache forced by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP vertex cache enabled.")); settings.gpu_pgxp_vertex_cache = settings.gpu_pgxp_enable; } else if (settings.gpu_pgxp_enable && settings.gpu_pgxp_vertex_cache) { Host::AddIconOSDMessage( - "gamedb_force_pgxp_vertex_cache", ICON_FA_MICROCHIP, + "gamedb_force_pgxp_vertex_cache", ICON_FA_EXCLAMATION_TRIANGLE, TRANSLATE_STR( - "OSDMessage", + "GameDatabase", "PGXP Vertex Cache is enabled, but it is not required for this game. This may cause rendering errors."), - osd_duration); + Host::OSD_WARNING_DURATION); } if (HasTrait(Trait::ForcePGXPCPUMode)) @@ -675,9 +617,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (display_osd_messages && settings.gpu_pgxp_enable && !settings.gpu_pgxp_cpu) { #ifndef __ANDROID__ - Host::AddIconOSDMessage("gamedb_force_pgxp_cpu", ICON_FA_MICROCHIP, - TRANSLATE_STR("OSDMessage", "PGXP CPU mode forced by compatibility settings."), - osd_duration); + APPEND_MESSAGE(ICON_FA_MICROCHIP, TRANSLATE_SV("GameDatabase", "PGXP CPU mode enabled.")); #else Host::AddIconOSDMessage( "gamedb_force_pgxp_cpu", ICON_FA_MICROCHIP, @@ -693,19 +633,15 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes { Host::AddIconOSDMessage( "gamedb_force_pgxp_cpu", ICON_FA_MICROCHIP, - TRANSLATE_STR("OSDMessage", + TRANSLATE_STR("GameDatabase", "PGXP CPU mode is enabled, but it is not required for this game. This may cause rendering errors."), - osd_duration); + Host::OSD_WARNING_DURATION); } if (HasTrait(Trait::DisablePGXPDepthBuffer)) { if (display_osd_messages && settings.gpu_pgxp_enable && settings.gpu_pgxp_depth_buffer) - { - Host::AddIconOSDMessage("gamedb_disable_pgxp_depth", ICON_FA_MAGIC, - TRANSLATE_STR("OSDMessage", "PGXP Depth Buffer disabled by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MAGIC, TRANSLATE_SV("GameDatabase", "PGXP depth buffer disabled.")); settings.gpu_pgxp_depth_buffer = false; } @@ -713,11 +649,8 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes if (HasTrait(Trait::DisablePGXPOn2DPolygons)) { if (display_osd_messages && settings.gpu_pgxp_enable && !settings.gpu_pgxp_disable_2d) - { - Host::AddIconOSDMessage("gamedb_disable_pgxp_2d", ICON_FA_MICROCHIP, - TRANSLATE_STR("OSDMessage", "PGXP disabled on 2D polygons by compatibility settings."), - osd_duration); - } + APPEND_MESSAGE(ICON_FA_MICROCHIP, TRANSLATE_SV("GameDatabase", "PGXP disabled on 2D polygons.")); + g_settings.gpu_pgxp_disable_2d = true; } @@ -739,6 +672,17 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes settings.cpu_fastmem_mode = CPUFastmemMode::LUT; } + if (!messages.empty()) + { + Host::AddIconOSDMessage( + "GameDBCompatibility", ICON_FA_MICROCHIP, + fmt::format("{}{}", TRANSLATE_SV("GameDatabase", "Compatibility settings for this game have been applied:"), + messages.view()), + Host::OSD_WARNING_DURATION); + } + +#undef APPEND_MESSAGE + #define BIT_FOR(ctype) (static_cast(1) << static_cast(ctype)) if (supported_controllers != 0 && supported_controllers != static_cast(-1)) @@ -777,7 +721,7 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes Host::AddKeyedOSDMessage( "gamedb_controller_unsupported", - fmt::format(TRANSLATE_FS("OSDMessage", + fmt::format(TRANSLATE_FS("GameDatabase", "Controller in port {0} ({1}) is not supported for {2}.\nSupported controllers: " "{3}\nPlease configure a supported controller from the list above."), i + 1u, Controller::GetControllerInfo(ctype)->GetDisplayName(), System::GetGameTitle(), diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index 189581be2..6b680e8ed 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -94,7 +94,7 @@ bool GPU::Initialize() m_console_is_pal = System::IsPALRegion(); UpdateCRTCConfig(); - if (!CompileDisplayPipelines(true, true, g_settings.gpu_24bit_chroma_smoothing)) + if (!CompileDisplayPipelines(true, true, g_settings.display_24bit_chroma_smoothing)) { Host::ReportErrorAsync("Error", "Failed to compile base GPU pipelines."); return false; @@ -130,7 +130,7 @@ void GPU::UpdateSettings(const Settings& old_settings) if (g_settings.display_scaling != old_settings.display_scaling || g_settings.display_deinterlacing_mode != old_settings.display_deinterlacing_mode || - g_settings.gpu_24bit_chroma_smoothing != old_settings.gpu_24bit_chroma_smoothing) + g_settings.display_24bit_chroma_smoothing != old_settings.display_24bit_chroma_smoothing) { // Toss buffers on mode change. if (g_settings.display_deinterlacing_mode != old_settings.display_deinterlacing_mode) @@ -138,7 +138,7 @@ void GPU::UpdateSettings(const Settings& old_settings) if (!CompileDisplayPipelines(g_settings.display_scaling != old_settings.display_scaling, g_settings.display_deinterlacing_mode != old_settings.display_deinterlacing_mode, - g_settings.gpu_24bit_chroma_smoothing != old_settings.gpu_24bit_chroma_smoothing)) + g_settings.display_24bit_chroma_smoothing != old_settings.display_24bit_chroma_smoothing)) { Panic("Failed to compile display pipeline on settings change."); } @@ -1886,7 +1886,7 @@ bool GPU::CompileDisplayPipelines(bool display, bool deinterlace, bool chroma_sm m_chroma_smoothing_pipeline.reset(); g_gpu_device->RecycleTexture(std::move(m_chroma_smoothing_texture)); - if (g_settings.gpu_24bit_chroma_smoothing) + if (g_settings.display_24bit_chroma_smoothing) { plconfig.layout = GPUPipeline::Layout::SingleTextureAndPushConstants; plconfig.SetTargetFormats(GPUTexture::Format::RGBA8); diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 42743a88b..93b46218e 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -3527,7 +3527,7 @@ void GPU_HW::UpdateDisplay() SetDisplayTexture(m_vram_extract_texture.get(), depth_source ? m_vram_extract_depth_texture.get() : nullptr, 0, 0, scaled_display_width, read_height); - if (g_settings.gpu_24bit_chroma_smoothing) + if (g_settings.display_24bit_chroma_smoothing) { if (ApplyChromaSmoothing()) { diff --git a/src/core/gpu_sw.cpp b/src/core/gpu_sw.cpp index b898be855..e2f9110a8 100644 --- a/src/core/gpu_sw.cpp +++ b/src/core/gpu_sw.cpp @@ -449,7 +449,7 @@ void GPU_SW::UpdateDisplay() if (CopyOut(vram_offset_x, vram_offset_y, skip_x, read_width, read_height, line_skip, is_24bit)) { SetDisplayTexture(m_upload_texture.get(), nullptr, 0, 0, read_width, read_height); - if (is_24bit && g_settings.gpu_24bit_chroma_smoothing) + if (is_24bit && g_settings.display_24bit_chroma_smoothing) { if (ApplyChromaSmoothing()) Deinterlace(field, 0); @@ -465,7 +465,7 @@ void GPU_SW::UpdateDisplay() if (CopyOut(vram_offset_x, vram_offset_y, skip_x, read_width, read_height, 0, is_24bit)) { SetDisplayTexture(m_upload_texture.get(), nullptr, 0, 0, read_width, read_height); - if (is_24bit && g_settings.gpu_24bit_chroma_smoothing) + if (is_24bit && g_settings.display_24bit_chroma_smoothing) ApplyChromaSmoothing(); } } diff --git a/src/core/settings.cpp b/src/core/settings.cpp index f55ae230c..5aacfe0af 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -190,6 +190,7 @@ void Settings::Load(SettingsInterface& si) gpu_disable_framebuffer_fetch = si.GetBoolValue("GPU", "DisableFramebufferFetch", false); gpu_disable_texture_buffers = si.GetBoolValue("GPU", "DisableTextureBuffers", false); gpu_disable_texture_copy_to_self = si.GetBoolValue("GPU", "DisableTextureCopyToSelf", false); + gpu_disable_memory_import = si.GetBoolValue("GPU", "DisableMemoryImport", false); gpu_per_sample_shading = si.GetBoolValue("GPU", "PerSampleShading", false); gpu_use_thread = si.GetBoolValue("GPU", "UseThread", true); gpu_use_software_renderer_for_readbacks = si.GetBoolValue("GPU", "UseSoftwareRendererForReadbacks", false); @@ -222,7 +223,7 @@ void Settings::Load(SettingsInterface& si) gpu_disable_interlacing = si.GetBoolValue("GPU", "DisableInterlacing", true); gpu_force_ntsc_timings = si.GetBoolValue("GPU", "ForceNTSCTimings", false); gpu_widescreen_hack = si.GetBoolValue("GPU", "WidescreenHack", false); - gpu_24bit_chroma_smoothing = si.GetBoolValue("GPU", "ChromaSmoothing24Bit", false); + display_24bit_chroma_smoothing = si.GetBoolValue("GPU", "ChromaSmoothing24Bit", false); gpu_pgxp_enable = si.GetBoolValue("GPU", "PGXPEnable", false); gpu_pgxp_culling = si.GetBoolValue("GPU", "PGXPCulling", true); gpu_pgxp_texture_correction = si.GetBoolValue("GPU", "PGXPTextureCorrection", true); @@ -492,6 +493,7 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const si.SetBoolValue("GPU", "DisableFramebufferFetch", gpu_disable_framebuffer_fetch); si.SetBoolValue("GPU", "DisableTextureBuffers", gpu_disable_texture_buffers); si.SetBoolValue("GPU", "DisableTextureCopyToSelf", gpu_disable_texture_copy_to_self); + si.SetBoolValue("GPU", "DisableMemoryImport", gpu_disable_memory_import); } si.SetBoolValue("GPU", "PerSampleShading", gpu_per_sample_shading); @@ -513,7 +515,7 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const si.SetBoolValue("GPU", "DisableInterlacing", gpu_disable_interlacing); si.SetBoolValue("GPU", "ForceNTSCTimings", gpu_force_ntsc_timings); si.SetBoolValue("GPU", "WidescreenHack", gpu_widescreen_hack); - si.SetBoolValue("GPU", "ChromaSmoothing24Bit", gpu_24bit_chroma_smoothing); + si.SetBoolValue("GPU", "ChromaSmoothing24Bit", display_24bit_chroma_smoothing); si.SetBoolValue("GPU", "PGXPEnable", gpu_pgxp_enable); si.SetBoolValue("GPU", "PGXPCulling", gpu_pgxp_culling); si.SetBoolValue("GPU", "PGXPTextureCorrection", gpu_pgxp_texture_correction); @@ -721,7 +723,7 @@ void Settings::FixIncompatibleSettings(bool display_osd_messages) g_settings.gpu_force_ntsc_timings = false; g_settings.gpu_widescreen_hack = false; g_settings.gpu_pgxp_enable = false; - g_settings.gpu_24bit_chroma_smoothing = false; + g_settings.display_24bit_chroma_smoothing = false; g_settings.cdrom_read_speedup = 1; g_settings.cdrom_seek_speedup = 1; g_settings.cdrom_mute_cd_audio = false; diff --git a/src/core/settings.h b/src/core/settings.h index b2a4b4884..933c983aa 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -113,17 +113,12 @@ struct Settings bool gpu_disable_framebuffer_fetch : 1 = false; bool gpu_disable_texture_buffers : 1 = false; bool gpu_disable_texture_copy_to_self : 1 = false; + bool gpu_disable_memory_import : 1 = false; bool gpu_per_sample_shading : 1 = false; bool gpu_true_color : 1 = true; bool gpu_debanding : 1 = false; bool gpu_scaled_dithering : 1 = true; bool gpu_force_round_texcoords : 1 = false; - GPUTextureFilter gpu_texture_filter = DEFAULT_GPU_TEXTURE_FILTER; - GPUTextureFilter gpu_sprite_texture_filter = DEFAULT_GPU_TEXTURE_FILTER; - GPULineDetectMode gpu_line_detect_mode = DEFAULT_GPU_LINE_DETECT_MODE; - GPUDownsampleMode gpu_downsample_mode = DEFAULT_GPU_DOWNSAMPLE_MODE; - u8 gpu_downsample_scale = 1; - GPUWireframeMode gpu_wireframe_mode = DEFAULT_GPU_WIREFRAME_MODE; bool gpu_disable_interlacing : 1 = true; bool gpu_force_ntsc_timings : 1 = false; bool gpu_widescreen_hack : 1 = false; @@ -136,6 +131,12 @@ struct Settings bool gpu_pgxp_preserve_proj_fp : 1 = false; bool gpu_pgxp_depth_buffer : 1 = false; bool gpu_pgxp_disable_2d : 1 = false; + GPUTextureFilter gpu_texture_filter = DEFAULT_GPU_TEXTURE_FILTER; + GPUTextureFilter gpu_sprite_texture_filter = DEFAULT_GPU_TEXTURE_FILTER; + GPULineDetectMode gpu_line_detect_mode = DEFAULT_GPU_LINE_DETECT_MODE; + GPUDownsampleMode gpu_downsample_mode = DEFAULT_GPU_DOWNSAMPLE_MODE; + u8 gpu_downsample_scale = 1; + GPUWireframeMode gpu_wireframe_mode = DEFAULT_GPU_WIREFRAME_MODE; DisplayDeinterlacingMode display_deinterlacing_mode = DEFAULT_DISPLAY_DEINTERLACING_MODE; DisplayCropMode display_crop_mode = DEFAULT_DISPLAY_CROP_MODE; DisplayAspectRatio display_aspect_ratio = DEFAULT_DISPLAY_ASPECT_RATIO; @@ -157,7 +158,7 @@ struct Settings bool display_vsync : 1 = false; bool display_disable_mailbox_presentation : 1 = true; bool display_force_4_3_for_24bit : 1 = false; - bool gpu_24bit_chroma_smoothing : 1 = false; + bool display_24bit_chroma_smoothing : 1 = false; bool display_show_osd_messages : 1 = true; bool display_show_fps : 1 = false; bool display_show_speed : 1 = false; diff --git a/src/core/system.cpp b/src/core/system.cpp index e5c0ef549..348143408 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -3937,6 +3937,7 @@ void System::CheckForSettingsChanges(const Settings& old_settings) g_settings.gpu_disable_framebuffer_fetch != old_settings.gpu_disable_framebuffer_fetch || g_settings.gpu_disable_texture_buffers != old_settings.gpu_disable_texture_buffers || g_settings.gpu_disable_texture_copy_to_self != old_settings.gpu_disable_texture_copy_to_self || + g_settings.gpu_disable_memory_import != old_settings.gpu_disable_memory_import || g_settings.display_exclusive_fullscreen_control != old_settings.display_exclusive_fullscreen_control)) { // if debug device/threaded presentation change, we need to recreate the whole display @@ -3948,6 +3949,7 @@ void System::CheckForSettingsChanges(const Settings& old_settings) g_settings.gpu_disable_framebuffer_fetch != old_settings.gpu_disable_framebuffer_fetch || g_settings.gpu_disable_texture_buffers != old_settings.gpu_disable_texture_buffers || g_settings.gpu_disable_texture_copy_to_self != old_settings.gpu_disable_texture_copy_to_self || + g_settings.gpu_disable_memory_import != old_settings.gpu_disable_memory_import || g_settings.display_exclusive_fullscreen_control != old_settings.display_exclusive_fullscreen_control); Host::AddIconOSDMessage("RendererSwitch", ICON_FA_PAINT_ROLLER, @@ -4058,11 +4060,11 @@ void System::CheckForSettingsChanges(const Settings& old_settings) g_settings.gpu_line_detect_mode != old_settings.gpu_line_detect_mode || g_settings.gpu_disable_interlacing != old_settings.gpu_disable_interlacing || g_settings.gpu_force_ntsc_timings != old_settings.gpu_force_ntsc_timings || - g_settings.gpu_24bit_chroma_smoothing != old_settings.gpu_24bit_chroma_smoothing || g_settings.gpu_downsample_mode != old_settings.gpu_downsample_mode || g_settings.gpu_downsample_scale != old_settings.gpu_downsample_scale || g_settings.gpu_wireframe_mode != old_settings.gpu_wireframe_mode || g_settings.display_deinterlacing_mode != old_settings.display_deinterlacing_mode || + g_settings.display_24bit_chroma_smoothing != old_settings.display_24bit_chroma_smoothing || g_settings.display_crop_mode != old_settings.display_crop_mode || g_settings.display_aspect_ratio != old_settings.display_aspect_ratio || g_settings.display_alignment != old_settings.display_alignment || diff --git a/src/duckstation-qt/qttranslations.cpp b/src/duckstation-qt/qttranslations.cpp index 04d07b2ee..676ead8c8 100644 --- a/src/duckstation-qt/qttranslations.cpp +++ b/src/duckstation-qt/qttranslations.cpp @@ -220,6 +220,7 @@ const char* QtHost::GetDefaultLanguage() static constexpr const ImWchar s_base_latin_range[] = { 0x0020, 0x00FF, // Basic Latin + Latin Supplement + 0x2022, 0x2022, // General punctuation }; static constexpr const ImWchar s_central_european_ranges[] = { 0x0100, 0x017F, // Central European diacritics diff --git a/src/duckstation-regtest/regtest_host.cpp b/src/duckstation-regtest/regtest_host.cpp index bda15898f..92c309964 100644 --- a/src/duckstation-regtest/regtest_host.cpp +++ b/src/duckstation-regtest/regtest_host.cpp @@ -117,6 +117,9 @@ bool RegTestHost::InitializeConfig() EmuFolders::LoadConfig(*s_base_settings_interface.get()); EmuFolders::EnsureFoldersExist(); + // imgui setup, make sure it doesn't bug out + ImGuiManager::SetFontPathAndRange(std::string(), {0x0020, 0x00FF}); + return true; } diff --git a/src/util/imgui_manager.cpp b/src/util/imgui_manager.cpp index 2b4fca836..c36a33260 100644 --- a/src/util/imgui_manager.cpp +++ b/src/util/imgui_manager.cpp @@ -523,31 +523,10 @@ bool ImGuiManager::LoadFontData() ImFont* ImGuiManager::AddTextFont(float size) { - static const ImWchar default_ranges[] = { - // Basic Latin + Latin Supplement + Central European diacritics - 0x0020, - 0x017F, - - // Cyrillic + Cyrillic Supplement - 0x0400, - 0x052F, - - // Cyrillic Extended-A - 0x2DE0, - 0x2DFF, - - // Cyrillic Extended-B - 0xA640, - 0xA69F, - - 0, - }; - ImFontConfig cfg; cfg.FontDataOwnedByAtlas = false; - return ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_standard_font_data.data(), - static_cast(s_standard_font_data.size()), size, &cfg, - s_font_range.empty() ? default_ranges : s_font_range.data()); + return ImGui::GetIO().Fonts->AddFontFromMemoryTTF( + s_standard_font_data.data(), static_cast(s_standard_font_data.size()), size, &cfg, s_font_range.data()); } ImFont* ImGuiManager::AddFixedFont(float size)