AMIGAOS: Use compiler defines

This commit is contained in:
Hubert Maier 2024-03-16 00:59:27 +01:00 committed by GitHub
parent 8af225e5f2
commit 794f292b5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -180,7 +180,7 @@ static const char *const boxVertex =
"uniform vec2 sizeWH;\n"
"uniform vec2 texcrop;\n"
// OGLES2 on AmigaOS doesn't support uniform booleans
#if defined(AMIGAOS)
#if defined(__amigaos4__)
"uniform mediump int flipY;\n"
#else
"uniform bool flipY;\n"
@ -191,7 +191,7 @@ static const char *const boxVertex =
"vec2 pos = offsetXY + position * sizeWH;\n"
"pos.x = pos.x * 2.0 - 1.0;\n"
"pos.y = pos.y * 2.0 - 1.0;\n"
#if defined(AMIGAOS)
#if defined(__amigaos4__)
"if (flipY != 0)\n"
#else
"if (flipY)\n"

View file

@ -453,7 +453,7 @@ enet_socket_send (ENetSocket socket,
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);
sin.sin_addr.s_addr = address -> host;
#ifdef AMIGAOS
#if defined(__amigaos4__)
msgHdr.msg_name = (char *)& sin;
#else
msgHdr.msg_name = & sin;
@ -491,7 +491,7 @@ enet_socket_receive (ENetSocket socket,
if (address != NULL)
{
#ifdef AMIGAOS
#if defined(__amigaos4__)
msgHdr.msg_name = (char *)& sin;
#else
msgHdr.msg_name = & sin;

View file

@ -208,7 +208,7 @@ void Context::initialize(ContextType contextType) {
if (type == kContextGLES2) {
// OGLES2 on AmigaOS reports GLSL version as 0.9 but we do what is needed to make it work
// so let's pretend it supports 1.00
#if defined(AMIGAOS)
#if defined(__amigaos4__)
if (glslVersion < 100) {
glslVersion = 100;
}

View file

@ -67,7 +67,7 @@ static const char *const compatFragment =
"#endif\n";
// OGLES2 on AmigaOS doesn't support uniform booleans, let's introduce some shim
#if defined(AMIGAOS)
#if defined(__amigaos4__)
static const char *const compatUniformBool =
"#define UBOOL mediump int\n"
"#define UBOOL_TEST(v) (v != 0)\n";