diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 5289d3b85d5..4ee6fcbd5ac 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -643,10 +643,16 @@ void shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r // check if no driver loaded (not all settings might be loaded yet) if (&machine->system() == &GAME_NAME(___empty)) { + return; + } + + // check if another driver is loaded + if (std::strcmp(machine->system().name, last_system_name) != 0) + { + strncpy(last_system_name, machine->system().name, sizeof(last_system_name)); + options->params_init = false; last_options.params_init = false; - - return; } enumerate_screens(); @@ -2255,6 +2261,8 @@ static INT32 slider_update_trampoline(running_machine &machine, void *arg, int i return 0; } +char shaders::last_system_name[16]; + hlsl_options shaders::last_options = { false }; enum slider_option diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h index 0eddbd5cd0e..738d77330f7 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.h +++ b/src/osd/modules/render/d3d/d3dhlsl.h @@ -439,6 +439,7 @@ private: static slider_desc s_sliders[]; static hlsl_options last_options; // last used options + static char last_system_name[16]; // last used system }; #endif