1
0
mirror of synced 2024-11-27 14:50:47 +01:00

Add LGJ scaling and fix ABC

This commit is contained in:
Bobby Dilley 2024-05-25 15:14:24 +01:00
parent d5ce6f3894
commit 4c006d591d
2 changed files with 41 additions and 2 deletions

View File

@ -179,6 +179,45 @@ int XF86VidModeGetAllModeLines(Display *display, int screen, int *modecount_retu
return true;
}
/**
* Function which games use to scale the output, some games behave well when this is changed
* others less so.
*/
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
int (*_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = dlsym(RTLD_NEXT, "glViewport");
switch (getConfig()->crc32)
{
case LETS_GO_JUNGLE:
case LETS_GO_JUNGLE_REVA:
{
if (width == 1360 && height == 768)
{
width = getConfig()->width;
height = getConfig()->height;
}
}
break;
case LETS_GO_JUNGLE_SPECIAL:
{
printf("glViewPort(%d, %d, %d, %d);\n", x, y, width, height);
if (width == 2048 && height == 768)
{
width = getConfig()->width * 2;
height = getConfig()->height;
}
}
break;
default:
break;
}
_glViewport(x, y, width, height);
}
typedef unsigned int uint;
int glXSwapIntervalSGI(int interval)

View File

@ -282,7 +282,7 @@ int initPatch()
detourFunction(0x083a61cc, stubReturn);
}
break;
case AFTER_BURNER_CLIMAX_REVA:
case AFTER_BURNER_CLIMAX_REVB:
{
if (config->showDebugMessages == 1)
{
@ -309,7 +309,7 @@ int initPatch()
detourFunction(0x081e492e, amDipswSetLed);
}
break;
case AFTER_BURNER_CLIMAX_REVB:
case AFTER_BURNER_CLIMAX_REVA:
{
if (config->showDebugMessages == 1)
{