@@ -769,10 +769,10 @@ int InitPlatform(void)
769
769
//AConfiguration_getScreenLong(platform.app->config);
770
770
771
771
// Set some default window flags
772
- CORE .Window .flags &= ~ FLAG_WINDOW_HIDDEN ; // false
773
- CORE .Window .flags &= ~ FLAG_WINDOW_MINIMIZED ; // false
774
- CORE .Window .flags |= FLAG_WINDOW_MAXIMIZED ; // true
775
- CORE .Window .flags &= ~ FLAG_WINDOW_UNFOCUSED ; // false
772
+ FLAG_CLEAR ( CORE .Window .flags , FLAG_WINDOW_HIDDEN ) ; // false
773
+ FLAG_CLEAR ( CORE .Window .flags , FLAG_WINDOW_MINIMIZED ) ; // false
774
+ FLAG_SET ( CORE .Window .flags , FLAG_WINDOW_MAXIMIZED ); // true
775
+ FLAG_CLEAR ( CORE .Window .flags , FLAG_WINDOW_UNFOCUSED ) ; // false
776
776
//----------------------------------------------------------------------------
777
777
778
778
// Initialize App command system
@@ -856,11 +856,11 @@ void ClosePlatform(void)
856
856
static int InitGraphicsDevice (void )
857
857
{
858
858
CORE .Window .fullscreen = true;
859
- CORE .Window .flags |= FLAG_FULLSCREEN_MODE ;
859
+ FLAG_SET ( CORE .Window .flags , FLAG_FULLSCREEN_MODE ) ;
860
860
861
861
EGLint samples = 0 ;
862
862
EGLint sampleBuffer = 0 ;
863
- if (CORE .Window .flags & FLAG_MSAA_4X_HINT )
863
+ if (FLAG_CHECK ( CORE .Window .flags , FLAG_MSAA_4X_HINT ) > 0 )
864
864
{
865
865
samples = 4 ;
866
866
sampleBuffer = 1 ;
@@ -965,7 +965,7 @@ static int InitGraphicsDevice(void)
965
965
966
966
CORE .Window .ready = true;
967
967
968
- if ((CORE .Window .flags & FLAG_WINDOW_MINIMIZED ) > 0 ) MinimizeWindow ();
968
+ if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_MINIMIZED ) > 0 ) MinimizeWindow ();
969
969
970
970
return 0 ;
971
971
}
@@ -1032,7 +1032,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
1032
1032
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
1033
1033
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
1034
1034
Rectangle rec = GetFontDefault ().recs [95 ];
1035
- if (CORE .Window .flags & FLAG_MSAA_4X_HINT )
1035
+ if (FLAG_CHECK ( CORE .Window .flags , FLAG_MSAA_4X_HINT ) > 0 )
1036
1036
{
1037
1037
// NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering
1038
1038
SetShapesTexture (GetFontDefault ().texture , (Rectangle ){ rec .x + 2 , rec .y + 2 , 1 , 1 });
@@ -1075,14 +1075,14 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
1075
1075
case APP_CMD_GAINED_FOCUS :
1076
1076
{
1077
1077
platform .appEnabled = true;
1078
- CORE .Window .flags &= ~ FLAG_WINDOW_UNFOCUSED ;
1078
+ FLAG_CLEAR ( CORE .Window .flags , FLAG_WINDOW_UNFOCUSED ) ;
1079
1079
//ResumeMusicStream();
1080
1080
} break ;
1081
1081
case APP_CMD_PAUSE : break ;
1082
1082
case APP_CMD_LOST_FOCUS :
1083
1083
{
1084
1084
platform .appEnabled = false;
1085
- CORE .Window .flags |= FLAG_WINDOW_UNFOCUSED ;
1085
+ FLAG_SET ( CORE .Window .flags , FLAG_WINDOW_UNFOCUSED ) ;
1086
1086
//PauseMusicStream();
1087
1087
} break ;
1088
1088
case APP_CMD_TERM_WINDOW :
@@ -1160,8 +1160,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
1160
1160
1161
1161
if (type == AINPUT_EVENT_TYPE_MOTION )
1162
1162
{
1163
- if (((source & AINPUT_SOURCE_JOYSTICK ) == AINPUT_SOURCE_JOYSTICK ) ||
1164
- ((source & AINPUT_SOURCE_GAMEPAD ) == AINPUT_SOURCE_GAMEPAD ))
1163
+ if ((FLAG_CHECK (source , AINPUT_SOURCE_JOYSTICK ) == AINPUT_SOURCE_JOYSTICK ) ||
1164
+ (FLAG_CHECK (source , AINPUT_SOURCE_GAMEPAD ) == AINPUT_SOURCE_GAMEPAD ))
1165
1165
{
1166
1166
// For now we'll assume a single gamepad which we "detect" on its input event
1167
1167
CORE .Input .Gamepad .ready [0 ] = true;
@@ -1224,8 +1224,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
1224
1224
//int32_t AKeyEvent_getMetaState(event);
1225
1225
1226
1226
// Handle gamepad button presses and releases
1227
- if (((source & AINPUT_SOURCE_JOYSTICK ) == AINPUT_SOURCE_JOYSTICK ) ||
1228
- ((source & AINPUT_SOURCE_GAMEPAD ) == AINPUT_SOURCE_GAMEPAD ))
1227
+ if ((FLAG_CHECK (source , AINPUT_SOURCE_JOYSTICK ) == AINPUT_SOURCE_JOYSTICK ) ||
1228
+ (FLAG_CHECK (source , AINPUT_SOURCE_GAMEPAD ) == AINPUT_SOURCE_GAMEPAD ))
1229
1229
{
1230
1230
// For now we'll assume a single gamepad which we "detect" on its input event
1231
1231
CORE .Input .Gamepad .ready [0 ] = true;
0 commit comments