Skip to content

Commit

Permalink
Merge pull request #268 from donnierussellii/gamma-slider-render
Browse files Browse the repository at this point in the history
Render 3d view when using gamma slider
  • Loading branch information
Interrupt authored Oct 24, 2018
2 parents 347273f + d27a40e commit 61e50cc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/GameSrc/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,17 @@ void input_screen_init(void) {
opanel_redraw(TRUE);
}

//gamma param not used here; see SetSDLPalette() in Shock.c
void gamma_slider_dealfunc(ushort gamma_qvar) {
gr_set_gamma_pal(0, 256, 0);

uiHideMouse(NULL);
render_run();
if (full_game_3d)
opanel_redraw(FALSE);
uiShowMouse(NULL);
}

void video_screen_init(void) {
LGRect r;
int i;
Expand Down Expand Up @@ -1821,7 +1832,7 @@ void video_screen_init(void) {
r.ul.x = r.ul.x + 1;
sliderbase = ((r.lr.x - r.ul.x - 1) * 29 / 100);
slider_init(i, REF_STR_OptionsText + 3, sizeof(ushort), TRUE, &(gShockPrefs.doGamma), 100,
sliderbase, gamma_dealfunc, &r);
sliderbase, gamma_slider_dealfunc, &r);

#if defined(VFX1_SUPPORT) || defined(CTM_SUPPORT)
i++;
Expand Down

0 comments on commit 61e50cc

Please sign in to comment.