Skip to content

Commit

Permalink
Merged pull request "Remove rowbytes, pixels args from R_ModeChanged(…
Browse files Browse the repository at this point in the history
…)": #357
  • Loading branch information
apanteleev committed Nov 20, 2023
2 parents 743a509 + fa91b27 commit ece5856
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion inc/refresh/refresh.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ extern void (*R_DiscardRawPic)(void);
// video mode and refresh state management entry points
extern void (*R_BeginFrame)(void);
extern void (*R_EndFrame)(void);
extern void (*R_ModeChanged)(int width, int height, int flags, int rowbytes, void *pixels);
extern void (*R_ModeChanged)(int width, int height, int flags);

// add decal to ring buffer
extern void (*R_AddDecal)(decal_t *d);
Expand Down
2 changes: 1 addition & 1 deletion src/client/refresh.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void(*R_UpdateRawPic)(int pic_w, int pic_h, const uint32_t *pic) = NULL;
void(*R_DiscardRawPic)(void) = NULL;
void(*R_BeginFrame)(void) = NULL;
void(*R_EndFrame)(void) = NULL;
void(*R_ModeChanged)(int width, int height, int flags, int rowbytes, void *pixels) = NULL;
void(*R_ModeChanged)(int width, int height, int flags) = NULL;
void(*R_AddDecal)(decal_t *d) = NULL;
bool(*R_InterceptKey)(unsigned key, bool down) = NULL;
bool(*R_IsHDR)(void) = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/refresh/gl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ void R_EndRegistration_GL(void)
R_ModeChanged
===============
*/
void R_ModeChanged_GL(int width, int height, int flags, int rowbytes, void *pixels)
void R_ModeChanged_GL(int width, int height, int flags)
{
r_config.width = width;
r_config.height = height;
Expand Down
2 changes: 1 addition & 1 deletion src/refresh/vkpt/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3567,7 +3567,7 @@ R_EndFrame_RTX(void)
}

void
R_ModeChanged_RTX(int width, int height, int flags, int rowbytes, void *pixels)
R_ModeChanged_RTX(int width, int height, int flags)
{
Com_DPrintf("mode changed %d %d\n", width, height);

Expand Down
8 changes: 1 addition & 7 deletions src/unix/video/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ VIDEO

static void mode_changed(void)
{
void *pixels;
int rowbytes;

SDL_GetWindowSize(sdl.window, &sdl.win_width, &sdl.win_height);

SDL_GL_GetDrawableSize(sdl.window, &sdl.width, &sdl.height);
Expand All @@ -146,10 +143,7 @@ static void mode_changed(void)
else
sdl.flags &= ~QVF_FULLSCREEN;

pixels = NULL;
rowbytes = 0;

R_ModeChanged(sdl.width, sdl.height, sdl.flags, rowbytes, pixels);
R_ModeChanged(sdl.width, sdl.height, sdl.flags);
SCR_ModeChanged();
}

Expand Down

0 comments on commit ece5856

Please sign in to comment.