Merge branch 'vidmodestuff' into Saturn-Testing
This commit is contained in:
commit
c7dd38ed9f
12 files changed
+44
-52
No files matched your search
@@ -226,10 +226,6 @@ const char *I_LocateWad(void)
|
||||
return "/sdcard/srb2";
|
||||
}
|
||||
|
||||
void I_GetJoystickEvents(void){}
|
||||
|
||||
void I_GetJoystick2Events(void){}
|
||||
|
||||
char *I_GetEnv(const char *name)
|
||||
{
|
||||
LOGW("I_GetEnv() called?!");
|
||||
|
||||
@@ -167,6 +167,8 @@ static char returnWadPath[256];
|
||||
#include "../i_video.h"
|
||||
#include "../i_sound.h"
|
||||
#include "../i_system.h"
|
||||
#include "../i_time.h"
|
||||
#include "../i_net.h"
|
||||
#include "../screen.h" //vid.WndParent
|
||||
#include "../d_net.h"
|
||||
#include "../g_game.h"
|
||||
@@ -196,8 +198,6 @@ UINT8 keyboard_started = false;
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
// TERMIOS console code from Quake3: thank you!
|
||||
boolean stdin_active = true;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t cursor;
|
||||
@@ -699,11 +699,7 @@ void I_JoyScale4(void)
|
||||
|
||||
|
||||
*/
|
||||
void I_ShutdownJoystick(void)
|
||||
{
|
||||
}
|
||||
|
||||
void I_GetJoystickEvents(UINT8 index)
|
||||
void I_ShutdownJoystick(UINT8 index)
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
@@ -129,6 +129,13 @@ INT32 VID_SetMode(INT32 modeNum)
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean I_CheckAboveDesktopRes(INT32 width, INT32 height)
|
||||
{
|
||||
(void)width;
|
||||
(void)height;
|
||||
return false;
|
||||
}
|
||||
|
||||
void I_StartupGraphics(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ extern "C" {
|
||||
*/
|
||||
#define MAX_QUIT_FUNCS 16
|
||||
|
||||
void I_GetConsoleEvents(void);
|
||||
|
||||
extern boolean consolevent;
|
||||
extern boolean framebuffer;
|
||||
|
||||
/** \brief Graphic system had started up
|
||||
*/
|
||||
|
||||
+9
-2
@@ -127,8 +127,6 @@ boolean I_CheckNativeRes(void);
|
||||
|
||||
void I_SetBorderlessWindow(void);
|
||||
|
||||
void I_HandleControllerHatRepeat(void);
|
||||
|
||||
#ifdef USE_FBO_OGL
|
||||
|
||||
void RefreshOGLSDLSurface(void);
|
||||
@@ -137,6 +135,15 @@ boolean UseScreenFBO(void);
|
||||
extern boolean downsample;
|
||||
#endif
|
||||
|
||||
// So we can call this from i_video event loop
|
||||
void I_ShutdownJoystick(UINT8 index);
|
||||
|
||||
// Quick thing to make SDL_JOYDEVICEADDED events less of an abomination
|
||||
void I_UpdateJoystickDeviceIndex(UINT8 player);
|
||||
void I_UpdateJoystickDeviceIndices(UINT8 excludePlayer);
|
||||
|
||||
void I_HandleControllerHatRepeat(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
+8
-10
@@ -213,14 +213,12 @@ static char returnWadPath[256];
|
||||
#include "../byteptr.h"
|
||||
#endif
|
||||
|
||||
SDL_bool consolevent = SDL_FALSE;
|
||||
SDL_bool framebuffer = SDL_FALSE;
|
||||
boolean consolevent = false;
|
||||
boolean framebuffer = false;
|
||||
UINT8 keyboard_started = false;
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
// TERMIOS console code from Quake3: thank you!
|
||||
SDL_bool stdin_active = SDL_TRUE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t cursor;
|
||||
@@ -282,7 +280,7 @@ static void I_ShutdownConsole(void)
|
||||
if (consolevent)
|
||||
{
|
||||
I_OutputMsg("Shutdown tty console\n");
|
||||
consolevent = SDL_FALSE;
|
||||
consolevent = false;
|
||||
tcsetattr(STDIN_FILENO, TCSADRAIN, &tty_tc);
|
||||
}
|
||||
}
|
||||
@@ -301,7 +299,7 @@ static void I_StartupConsole(void)
|
||||
framebuffer = static_cast<SDL_bool>( M_CheckParm("-framebuffer"));
|
||||
|
||||
if (framebuffer)
|
||||
consolevent = SDL_FALSE;
|
||||
consolevent = false;
|
||||
|
||||
if (!consolevent)
|
||||
return;
|
||||
@@ -309,7 +307,7 @@ static void I_StartupConsole(void)
|
||||
if (isatty(STDIN_FILENO)!=1)
|
||||
{
|
||||
I_OutputMsg("stdin is not a tty, tty console mode failed\n");
|
||||
consolevent = SDL_FALSE;
|
||||
consolevent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -511,7 +509,7 @@ static void I_StartupConsole(void)
|
||||
if (gotConsole)
|
||||
{
|
||||
SetConsoleTitleA("SRB2Kart Console");
|
||||
consolevent = SDL_TRUE;
|
||||
consolevent = true;
|
||||
}
|
||||
|
||||
//Let get the real console HANDLE, because Mingw's Bash is bad!
|
||||
@@ -544,7 +542,7 @@ static inline void I_StartupConsole(void)
|
||||
framebuffer = M_CheckParm("-framebuffer");
|
||||
|
||||
if (framebuffer)
|
||||
consolevent = SDL_FALSE;
|
||||
consolevent = false;
|
||||
}
|
||||
static inline void I_ShutdownConsole(void){}
|
||||
#endif
|
||||
@@ -765,7 +763,7 @@ void I_JoyScale4(void)
|
||||
}
|
||||
|
||||
// Cheat to get the device index for a joystick handle
|
||||
INT32 I_GetJoystickDeviceIndex(SDL_GameController *dev)
|
||||
static INT32 I_GetJoystickDeviceIndex(SDL_GameController *dev)
|
||||
{
|
||||
SDL_Joystick *joystick = NULL;
|
||||
|
||||
|
||||
+6
-3
@@ -157,9 +157,12 @@ static SDL_bool usesdl2soft = SDL_FALSE;
|
||||
static SDL_bool borderlesswindow = SDL_FALSE;
|
||||
|
||||
// SDL2 vars
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Renderer *renderer = NULL;
|
||||
static SDL_Window *window = NULL;
|
||||
static SDL_Renderer *renderer = NULL;
|
||||
static SDL_Texture *texture = NULL;
|
||||
#ifdef HWRENDER
|
||||
static SDL_GLContext sdlglcontext = NULL;
|
||||
#endif
|
||||
static SDL_bool havefocus = SDL_TRUE;
|
||||
|
||||
static SDL_bool Impl_CreateWindow(SDL_bool fullscreen);
|
||||
@@ -1411,7 +1414,7 @@ void I_FinishUpdate(void)
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
OglSdlFinishUpdate();
|
||||
OglSdlFinishUpdate(window);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -461,7 +461,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
||||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = Z_Malloc(len, PU_SOUND, 0);
|
||||
mem = Z_Malloc(len, PU_SOUND, NULL);
|
||||
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_free_info(info);
|
||||
@@ -499,7 +499,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
||||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = Z_Malloc(len, PU_SOUND, 0);
|
||||
mem = Z_Malloc(len, PU_SOUND, NULL);
|
||||
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_free_info(info);
|
||||
|
||||
+1
-2
@@ -72,7 +72,6 @@ boolean UseScreenFBO(void)
|
||||
/** \brief SDL video display surface
|
||||
*/
|
||||
INT32 oglflags = 0;
|
||||
SDL_GLContext sdlglcontext = NULL;
|
||||
|
||||
void *GetGLFunc(const char *proc)
|
||||
{
|
||||
@@ -221,7 +220,7 @@ boolean OglSdlSurface(INT32 w, INT32 h)
|
||||
|
||||
\return void
|
||||
*/
|
||||
void OglSdlFinishUpdate(void)
|
||||
void OglSdlFinishUpdate(SDL_Window *window)
|
||||
{
|
||||
int sdlw, sdlh;
|
||||
|
||||
|
||||
+1
-3
@@ -20,11 +20,9 @@
|
||||
|
||||
boolean OglSdlSurface(INT32 w, INT32 h);
|
||||
|
||||
void OglSdlFinishUpdate(void);
|
||||
void OglSdlFinishUpdate(SDL_Window *window);
|
||||
boolean VID_LoadOGLAPI(void);
|
||||
|
||||
extern SDL_Renderer *renderer;
|
||||
extern SDL_GLContext sdlglcontext;
|
||||
extern Uint16 realwidth;
|
||||
extern Uint16 realheight;
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern SDL_bool consolevent;
|
||||
extern SDL_bool framebuffer;
|
||||
|
||||
#include "../m_fixed.h"
|
||||
|
||||
// SDL2 stub macro
|
||||
@@ -67,21 +64,6 @@ extern SDLJoyInfo_t JoyInfo[4]; //MAXSPLITSCREENPLAYERS
|
||||
#define SDL_JDEADZONE 153
|
||||
#undef SDL_JDEADZONE
|
||||
|
||||
// So we can call this from i_video event loop
|
||||
void I_ShutdownJoystick(UINT8 index);
|
||||
|
||||
// Cheat to get the device index for a game controller handle
|
||||
INT32 I_GetJoystickDeviceIndex(SDL_GameController *dev);
|
||||
|
||||
// Quick thing to make SDL_JOYDEVICEADDED events less of an abomination
|
||||
void I_UpdateJoystickDeviceIndex(UINT8 player);
|
||||
void I_UpdateJoystickDeviceIndices(UINT8 excludePlayer);
|
||||
|
||||
void I_GetConsoleEvents(void);
|
||||
|
||||
// Needed for some WIN32 functions
|
||||
extern SDL_Window *window;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -2012,13 +2012,15 @@ void *W_CachePatchNameRotated(const char *name, INT32 rotationangle, INT32 tag)
|
||||
rspr = static_cast<rotsprite_t *>(W_GetCachedRotPatchPwad(WADFILENUM(num), LUMPNUM(num)));
|
||||
|
||||
if (rspr == NULL)
|
||||
return W_CachePatchNum(W_GetNumForName("MISSING"), tag);
|
||||
return W_CachePatchNum(num, tag);
|
||||
|
||||
if (rspr->patches[idx] == NULL)
|
||||
{
|
||||
INT32 xpivot = 0, ypivot = 0;
|
||||
|
||||
ptr = static_cast<patch_t *>(W_CachePatchNum(num, PU_PATCH));
|
||||
if (ptr == NULL)
|
||||
return W_CachePatchNum(num, tag);
|
||||
|
||||
// >y pivot centered
|
||||
// >x pivot not centered
|
||||
|
||||
Reference in new issue
Block a user