mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Fixed reset of HLSL settings
- fixed bug that resets the HLSL settings when switching between window mode and fullscreen
This commit is contained in:
parent
8be53c28f0
commit
94453b474d
@ -102,6 +102,8 @@ shaders::shaders():
|
||||
|
||||
shaders::~shaders()
|
||||
{
|
||||
last_options = *options;
|
||||
|
||||
options = NULL;
|
||||
|
||||
cache_target *currcache = cachehead;
|
||||
@ -677,6 +679,11 @@ void shaders::init(base *d3dintf, running_machine *machine, d3d::renderer *rende
|
||||
snap_width = winoptions.d3d_snap_width();
|
||||
snap_height = winoptions.d3d_snap_height();
|
||||
|
||||
if (last_options.params_init)
|
||||
{
|
||||
options = &last_options;
|
||||
}
|
||||
|
||||
if (!options->params_init)
|
||||
{
|
||||
strncpy(options->shadow_mask_texture, winoptions.screen_shadow_mask_texture(), sizeof(options->shadow_mask_texture));
|
||||
@ -2679,10 +2686,7 @@ static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, std::
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
|
||||
//============================================================
|
||||
// init_slider_list
|
||||
//============================================================
|
||||
hlsl_options shaders::last_options;
|
||||
|
||||
shaders::slider_desc shaders::s_sliders[] =
|
||||
{
|
||||
@ -2763,6 +2767,11 @@ shaders::slider_desc shaders::s_sliders[] =
|
||||
{ NULL, 0, 0, 0, 0, 0, NULL },
|
||||
};
|
||||
|
||||
|
||||
//============================================================
|
||||
// init_slider_list
|
||||
//============================================================
|
||||
|
||||
slider_state *shaders::init_slider_list()
|
||||
{
|
||||
if (!master_enable || !d3dintf->post_fx_available)
|
||||
|
@ -434,6 +434,7 @@ private:
|
||||
cache_target * cachehead;
|
||||
|
||||
static slider_desc s_sliders[];
|
||||
static hlsl_options last_options; // last used options
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user