Skip to content

Commit 61e50cc

Browse files
authored
Merge pull request #268 from donnierussellii/gamma-slider-render
Render 3d view when using gamma slider
2 parents 347273f + d27a40e commit 61e50cc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/GameSrc/wrapper.c

+12-1
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,17 @@ void input_screen_init(void) {
17751775
opanel_redraw(TRUE);
17761776
}
17771777

1778+
//gamma param not used here; see SetSDLPalette() in Shock.c
1779+
void gamma_slider_dealfunc(ushort gamma_qvar) {
1780+
gr_set_gamma_pal(0, 256, 0);
1781+
1782+
uiHideMouse(NULL);
1783+
render_run();
1784+
if (full_game_3d)
1785+
opanel_redraw(FALSE);
1786+
uiShowMouse(NULL);
1787+
}
1788+
17781789
void video_screen_init(void) {
17791790
LGRect r;
17801791
int i;
@@ -1821,7 +1832,7 @@ void video_screen_init(void) {
18211832
r.ul.x = r.ul.x + 1;
18221833
sliderbase = ((r.lr.x - r.ul.x - 1) * 29 / 100);
18231834
slider_init(i, REF_STR_OptionsText + 3, sizeof(ushort), TRUE, &(gShockPrefs.doGamma), 100,
1824-
sliderbase, gamma_dealfunc, &r);
1835+
sliderbase, gamma_slider_dealfunc, &r);
18251836

18261837
#if defined(VFX1_SUPPORT) || defined(CTM_SUPPORT)
18271838
i++;

0 commit comments

Comments
 (0)