mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'convert-sdl-i-video' into 'master'
cxx: Convert sdl/i_video.cpp See merge request KartKrew/Kart!872
This commit is contained in:
commit
5fe4e299c9
2 changed files with 13 additions and 13 deletions
|
|
@ -7,7 +7,7 @@ target_sources(SRB2SDL2 PRIVATE
|
|||
i_net.c
|
||||
i_system.c
|
||||
i_main.cpp
|
||||
i_video.c
|
||||
i_video.cpp
|
||||
dosstr.c
|
||||
endtxt.c
|
||||
hwsym_sdl.c
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ static INT32 SDLJoyAxis(const Sint16 axis, UINT8 pid)
|
|||
|
||||
static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||
{
|
||||
#define FOCUSUNION (mousefocus | (kbfocus << 1))
|
||||
#define FOCUSUNION static_cast<unsigned int>(mousefocus | (kbfocus << 1))
|
||||
static SDL_bool firsttimeonmouse = SDL_TRUE;
|
||||
static SDL_bool mousefocus = SDL_TRUE;
|
||||
static SDL_bool kbfocus = SDL_TRUE;
|
||||
|
|
@ -946,7 +946,7 @@ void I_GetEvent(void)
|
|||
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
{
|
||||
if (newcontroller && (!JoyInfo[i].dev || !SDL_GameControllerGetAttached(JoyInfo[i].dev)))
|
||||
if (newcontroller && (!JoyInfo[i].dev || !SDL_GameControllerGetAttached(JoyInfo[i].dev)))
|
||||
{
|
||||
UINT8 j;
|
||||
|
||||
|
|
@ -1553,7 +1553,7 @@ boolean VID_CheckRenderer(void)
|
|||
|
||||
if (setrenderneeded)
|
||||
{
|
||||
rendermode = setrenderneeded;
|
||||
rendermode = static_cast<rendermode_t>(setrenderneeded);
|
||||
rendererchanged = true;
|
||||
|
||||
#ifdef HWRENDER
|
||||
|
|
@ -1585,7 +1585,7 @@ boolean VID_CheckRenderer(void)
|
|||
}
|
||||
|
||||
// Create a new window.
|
||||
Impl_CreateWindow(USE_FULLSCREEN);
|
||||
Impl_CreateWindow(static_cast<SDL_bool>(USE_FULLSCREEN));
|
||||
|
||||
// From there, the OpenGL context was already created.
|
||||
contextcreated = true;
|
||||
|
|
@ -1602,7 +1602,7 @@ boolean VID_CheckRenderer(void)
|
|||
setrenderneeded = 0;
|
||||
}
|
||||
|
||||
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (setmodeneeded ? SDL_TRUE : SDL_FALSE));
|
||||
SDLSetMode(vid.width, vid.height, static_cast<SDL_bool>(USE_FULLSCREEN), (setmodeneeded ? SDL_TRUE : SDL_FALSE));
|
||||
Impl_VideoSetupBuffer();
|
||||
|
||||
if (rendermode == render_soft)
|
||||
|
|
@ -1695,7 +1695,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
|||
#endif
|
||||
|
||||
// Create a window
|
||||
window = SDL_CreateWindow("Dr. Robotnik's Ring Racers "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
window = SDL_CreateWindow("Dr. Robotnik's Ring Racers " VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
realwidth, realheight, flags);
|
||||
|
||||
|
||||
|
|
@ -1762,7 +1762,7 @@ static void Impl_VideoSetupBuffer(void)
|
|||
vid.direct = NULL;
|
||||
if (vid.buffer)
|
||||
free(vid.buffer);
|
||||
vid.buffer = calloc(vid.rowbytes*vid.height, NUMSCREENS);
|
||||
vid.buffer = static_cast<uint8_t*>(calloc(vid.rowbytes*vid.height, NUMSCREENS));
|
||||
if (!vid.buffer)
|
||||
{
|
||||
I_Error("%s", M_GetText("Not enough memory for video buffer\n"));
|
||||
|
|
@ -1786,8 +1786,8 @@ void I_StartupGraphics(void)
|
|||
CV_RegisterVar (&cv_vidwait);
|
||||
CV_RegisterVar (&cv_stretch);
|
||||
CV_RegisterVar (&cv_alwaysgrabmouse);
|
||||
disable_mouse = M_CheckParm("-nomouse");
|
||||
disable_fullscreen = M_CheckParm("-win") ? 1 : 0;
|
||||
disable_mouse = static_cast<SDL_bool>(M_CheckParm("-nomouse"));
|
||||
disable_fullscreen = M_CheckParm("-win") ? SDL_TRUE : SDL_FALSE;
|
||||
|
||||
keyboard_started = true;
|
||||
|
||||
|
|
@ -1822,7 +1822,7 @@ void I_StartupGraphics(void)
|
|||
{
|
||||
if (!stricmp(modeparm, renderer_list[i].strvalue))
|
||||
{
|
||||
chosenrendermode = renderer_list[i].value;
|
||||
chosenrendermode = static_cast<rendermode_t>(renderer_list[i].value);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
|
@ -1850,8 +1850,8 @@ void I_StartupGraphics(void)
|
|||
if (chosenrendermode != render_none)
|
||||
rendermode = chosenrendermode;
|
||||
|
||||
usesdl2soft = M_CheckParm("-softblit");
|
||||
borderlesswindow = M_CheckParm("-borderless");
|
||||
usesdl2soft = M_CheckParm("-softblit") ? SDL_TRUE : SDL_FALSE;
|
||||
borderlesswindow = M_CheckParm("-borderless") ? SDL_TRUE : SDL_FALSE;
|
||||
|
||||
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
|
||||
VID_Command_ModeList_f();
|
||||
Loading…
Add table
Reference in a new issue