mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 05:41:02 +00:00
Parse GL version correctly.
This commit is contained in:
parent
d8484a86e0
commit
d056e82b3b
1 changed files with 5 additions and 5 deletions
|
@ -535,7 +535,7 @@ boolean SetupGLFunc13(void)
|
||||||
// Parse the GL version
|
// Parse the GL version
|
||||||
if (version != NULL)
|
if (version != NULL)
|
||||||
{
|
{
|
||||||
if (sscanf(version, "%d.%d", &glmajor, &glminor) == 2)
|
if (sscanf((const char*)version, "%d.%d", &glmajor, &glminor) == 2)
|
||||||
{
|
{
|
||||||
// Look, we gotta prepare for the inevitable arrival of GL 2.0 code...
|
// Look, we gotta prepare for the inevitable arrival of GL 2.0 code...
|
||||||
switch (glmajor)
|
switch (glmajor)
|
||||||
|
@ -543,6 +543,10 @@ boolean SetupGLFunc13(void)
|
||||||
case 1:
|
case 1:
|
||||||
if (glminor == 3) gl13 = true;
|
if (glminor == 3) gl13 = true;
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
gl13 = true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2400,12 +2404,8 @@ EXPORT void HWRAPI(MakeScreenFinalTexture) (void)
|
||||||
EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height)
|
EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height)
|
||||||
{
|
{
|
||||||
float xfix, yfix;
|
float xfix, yfix;
|
||||||
int lmaxx, lmaxy;
|
|
||||||
INT32 texsize = 2048;
|
INT32 texsize = 2048;
|
||||||
|
|
||||||
lmaxx = width < screen_width ? screen_width : width;
|
|
||||||
lmaxy = height < screen_height ? screen_height : height;
|
|
||||||
|
|
||||||
if(screen_width <= 1024)
|
if(screen_width <= 1024)
|
||||||
texsize = 1024;
|
texsize = 1024;
|
||||||
if(screen_width <= 512)
|
if(screen_width <= 512)
|
||||||
|
|
Loading…
Reference in a new issue