@@ -324,7 +324,7 @@ void ToggleFullscreen(void)
324
324
325
325
// Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS)
326
326
// NOTE: V-Sync can be enabled by graphic driver configuration
327
- if (FLAG_CHECK (CORE .Window .flags , FLAG_VSYNC_HINT ) > 0 ) RGFW_window_swapInterval (platform .window , 1 );
327
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_VSYNC_HINT )) RGFW_window_swapInterval (platform .window , 1 );
328
328
}
329
329
330
330
// Toggle borderless windowed mode
@@ -366,7 +366,7 @@ void MinimizeWindow(void)
366
366
// Restore window from being minimized/maximized
367
367
void RestoreWindow (void )
368
368
{
369
- if (!FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
369
+ if (!FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
370
370
371
371
RGFW_window_restore (platform .window );
372
372
}
@@ -378,66 +378,66 @@ void SetWindowState(unsigned int flags)
378
378
379
379
FLAG_SET (CORE .Window .flags , flags );
380
380
381
- if (FLAG_CHECK (flags , FLAG_VSYNC_HINT ))
381
+ if (FLAG_IS_SET (flags , FLAG_VSYNC_HINT ))
382
382
{
383
383
RGFW_window_swapInterval (platform .window , 1 );
384
384
}
385
- if (FLAG_CHECK (flags , FLAG_FULLSCREEN_MODE ))
385
+ if (FLAG_IS_SET (flags , FLAG_FULLSCREEN_MODE ))
386
386
{
387
387
if (!CORE .Window .fullscreen ) ToggleFullscreen ();
388
388
}
389
- if (FLAG_CHECK (flags , FLAG_WINDOW_RESIZABLE ))
389
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_RESIZABLE ))
390
390
{
391
391
RGFW_window_setMaxSize (platform .window , RGFW_AREA (0 , 0 ));
392
392
RGFW_window_setMinSize (platform .window , RGFW_AREA (0 , 0 ));
393
393
}
394
- if (FLAG_CHECK (flags , FLAG_WINDOW_UNDECORATED ))
394
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_UNDECORATED ))
395
395
{
396
396
RGFW_window_setBorder (platform .window , 0 );
397
397
}
398
- if (FLAG_CHECK (flags , FLAG_WINDOW_HIDDEN ))
398
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_HIDDEN ))
399
399
{
400
400
RGFW_window_hide (platform .window );
401
401
}
402
- if (FLAG_CHECK (flags , FLAG_WINDOW_MINIMIZED ))
402
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MINIMIZED ))
403
403
{
404
404
RGFW_window_minimize (platform .window );
405
405
}
406
- if (FLAG_CHECK (flags , FLAG_WINDOW_MAXIMIZED ))
406
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MAXIMIZED ))
407
407
{
408
408
RGFW_window_maximize (platform .window );
409
409
}
410
- if (FLAG_CHECK (flags , FLAG_WINDOW_UNFOCUSED ))
410
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_UNFOCUSED ))
411
411
{
412
412
FLAG_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED );
413
413
FLAG_CLEAR (platform .window -> _flags , RGFW_windowFocusOnShow );
414
414
RGFW_window_setFlags (platform .window , platform .window -> _flags );
415
415
}
416
- if (FLAG_CHECK (flags , FLAG_WINDOW_TOPMOST ))
416
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_TOPMOST ))
417
417
{
418
418
RGFW_window_setFloating (platform .window , RGFW_TRUE );
419
419
}
420
- if (FLAG_CHECK (flags , FLAG_WINDOW_TRANSPARENT ))
420
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_TRANSPARENT ))
421
421
{
422
422
TRACELOG (LOG_WARNING , "WINDOW: Framebuffer transparency can only be configured before window initialization" );
423
423
}
424
- if (FLAG_CHECK (flags , FLAG_WINDOW_HIGHDPI ))
424
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_HIGHDPI ))
425
425
{
426
426
TRACELOG (LOG_WARNING , "WINDOW: High DPI can only be configured before window initialization" );
427
427
}
428
- if (FLAG_CHECK (flags , FLAG_WINDOW_MOUSE_PASSTHROUGH ))
428
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MOUSE_PASSTHROUGH ))
429
429
{
430
430
RGFW_window_setMousePassthrough (platform .window , 1 );
431
431
}
432
- if (FLAG_CHECK (flags , FLAG_BORDERLESS_WINDOWED_MODE ))
432
+ if (FLAG_IS_SET (flags , FLAG_BORDERLESS_WINDOWED_MODE ))
433
433
{
434
434
ToggleBorderlessWindowed ();
435
435
}
436
- if (FLAG_CHECK (flags , FLAG_MSAA_4X_HINT ))
436
+ if (FLAG_IS_SET (flags , FLAG_MSAA_4X_HINT ))
437
437
{
438
438
RGFW_setGLHint (RGFW_glSamples , 4 );
439
439
}
440
- if (FLAG_CHECK (flags , FLAG_INTERLACED_HINT ))
440
+ if (FLAG_IS_SET (flags , FLAG_INTERLACED_HINT ))
441
441
{
442
442
TRACELOG (LOG_WARNING , "RPI: Interlaced mode can only be configured before window initialization" );
443
443
}
@@ -448,70 +448,70 @@ void ClearWindowState(unsigned int flags)
448
448
{
449
449
FLAG_CLEAR (CORE .Window .flags , flags );
450
450
451
- if (FLAG_CHECK (flags , FLAG_VSYNC_HINT ))
451
+ if (FLAG_IS_SET (flags , FLAG_VSYNC_HINT ))
452
452
{
453
453
RGFW_window_swapInterval (platform .window , 0 );
454
454
}
455
- if (FLAG_CHECK (flags , FLAG_FULLSCREEN_MODE ))
455
+ if (FLAG_IS_SET (flags , FLAG_FULLSCREEN_MODE ))
456
456
{
457
457
if (CORE .Window .fullscreen ) ToggleFullscreen ();
458
458
}
459
- if (FLAG_CHECK (flags , FLAG_WINDOW_RESIZABLE ))
459
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_RESIZABLE ))
460
460
{
461
461
RGFW_window_setMaxSize (platform .window , RGFW_AREA (platform .window -> r .w , platform .window -> r .h ));
462
462
RGFW_window_setMinSize (platform .window , RGFW_AREA (platform .window -> r .w , platform .window -> r .h ));
463
463
}
464
- if (FLAG_CHECK (flags , FLAG_WINDOW_UNDECORATED ))
464
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_UNDECORATED ))
465
465
{
466
466
RGFW_window_setBorder (platform .window , 1 );
467
467
}
468
- if (FLAG_CHECK (flags , FLAG_WINDOW_HIDDEN ))
468
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_HIDDEN ))
469
469
{
470
- if (!FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
470
+ if (!FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
471
471
472
472
RGFW_window_show (platform .window );
473
473
}
474
- if (FLAG_CHECK (flags , FLAG_WINDOW_MINIMIZED ))
474
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MINIMIZED ))
475
475
{
476
- if (!FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
476
+ if (!FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
477
477
478
478
RGFW_window_restore (platform .window );
479
479
}
480
- if (FLAG_CHECK (flags , FLAG_WINDOW_MAXIMIZED ))
480
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MAXIMIZED ))
481
481
{
482
- if (!FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
482
+ if (!FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) RGFW_window_focus (platform .window );
483
483
484
484
RGFW_window_restore (platform .window );
485
485
}
486
- if (FLAG_CHECK (flags , FLAG_WINDOW_UNFOCUSED ))
486
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_UNFOCUSED ))
487
487
{
488
488
RGFW_window_setFlags (platform .window , platform .window -> _flags | RGFW_windowFocusOnShow );
489
489
}
490
- if (FLAG_CHECK (flags , FLAG_WINDOW_TOPMOST ))
490
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_TOPMOST ))
491
491
{
492
492
RGFW_window_setFloating (platform .window , RGFW_FALSE );
493
493
}
494
- if (FLAG_CHECK (flags , FLAG_WINDOW_TRANSPARENT ))
494
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_TRANSPARENT ))
495
495
{
496
496
TRACELOG (LOG_WARNING , "WINDOW: Framebuffer transparency can only be configured before window initialization" );
497
497
}
498
- if (FLAG_CHECK (flags , FLAG_WINDOW_HIGHDPI ))
498
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_HIGHDPI ))
499
499
{
500
500
TRACELOG (LOG_WARNING , "WINDOW: High DPI can only be configured before window initialization" );
501
501
}
502
- if (FLAG_CHECK (flags , FLAG_WINDOW_MOUSE_PASSTHROUGH ))
502
+ if (FLAG_IS_SET (flags , FLAG_WINDOW_MOUSE_PASSTHROUGH ))
503
503
{
504
504
RGFW_window_setMousePassthrough (platform .window , 0 );
505
505
}
506
- if (FLAG_CHECK (flags , FLAG_BORDERLESS_WINDOWED_MODE ))
506
+ if (FLAG_IS_SET (flags , FLAG_BORDERLESS_WINDOWED_MODE ))
507
507
{
508
508
if (CORE .Window .fullscreen ) ToggleBorderlessWindowed ();
509
509
}
510
- if (FLAG_CHECK (flags , FLAG_MSAA_4X_HINT ))
510
+ if (FLAG_IS_SET (flags , FLAG_MSAA_4X_HINT ))
511
511
{
512
512
RGFW_setGLHint (RGFW_glSamples , 0 );
513
513
}
514
- if (FLAG_CHECK (flags , FLAG_INTERLACED_HINT ))
514
+ if (FLAG_IS_SET (flags , FLAG_INTERLACED_HINT ))
515
515
{
516
516
TRACELOG (LOG_WARNING , "RPI: Interlaced mode can only be configured before window initialization" );
517
517
}
@@ -968,7 +968,7 @@ void PollInputEvents(void)
968
968
CORE .Window .resizedLastFrame = false;
969
969
970
970
CORE .Input .Mouse .previousPosition = CORE .Input .Mouse .currentPosition ;
971
- if (FLAG_CHECK (platform .window -> _flags , RGFW_HOLD_MOUSE ))
971
+ if (FLAG_IS_SET (platform .window -> _flags , RGFW_HOLD_MOUSE ))
972
972
{
973
973
CORE .Input .Mouse .previousPosition = (Vector2 ){ 0.0f , 0.0f };
974
974
CORE .Input .Mouse .currentPosition = (Vector2 ){ 0.0f , 0.0f };
@@ -1144,7 +1144,7 @@ void PollInputEvents(void)
1144
1144
} break ;
1145
1145
case RGFW_mousePosChanged :
1146
1146
{
1147
- if (FLAG_CHECK (platform .window -> _flags , RGFW_HOLD_MOUSE ))
1147
+ if (FLAG_IS_SET (platform .window -> _flags , RGFW_HOLD_MOUSE ))
1148
1148
{
1149
1149
CORE .Input .Mouse .currentPosition .x += (float )event -> vector .x ;
1150
1150
CORE .Input .Mouse .currentPosition .y += (float )event -> vector .y ;
@@ -1268,24 +1268,24 @@ int InitPlatform(void)
1268
1268
unsigned int flags = RGFW_windowCenter | RGFW_windowAllowDND ;
1269
1269
1270
1270
// Check window creation flags
1271
- if (( FLAG_CHECK ( CORE .Window .flags , FLAG_FULLSCREEN_MODE )) > 0 )
1271
+ if (FLAG_IS_SET ( CORE .Window .flags , FLAG_FULLSCREEN_MODE ))
1272
1272
{
1273
1273
CORE .Window .fullscreen = true;
1274
1274
FLAG_SET (flags , RGFW_windowFullscreen );
1275
1275
}
1276
1276
1277
- if (FLAG_CHECK (CORE .Window .flags , FLAG_BORDERLESS_WINDOWED_MODE ) > 0 )
1277
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_BORDERLESS_WINDOWED_MODE ))
1278
1278
{
1279
1279
CORE .Window .fullscreen = true;
1280
1280
FLAG_SET (flags , RGFW_windowedFullscreen );
1281
1281
}
1282
1282
1283
- if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNDECORATED ) > 0 ) FLAG_SET (flags , RGFW_windowNoBorder );
1284
- if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_RESIZABLE ) == 0 ) FLAG_SET (flags , RGFW_windowNoResize );
1285
- if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_TRANSPARENT ) > 0 ) FLAG_SET (flags , RGFW_windowTransparent );
1286
- if (FLAG_CHECK (CORE .Window .flags , FLAG_FULLSCREEN_MODE ) > 0 ) FLAG_SET (flags , RGFW_windowFullscreen );
1287
- if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_HIDDEN ) > 0 ) FLAG_SET (flags , RGFW_windowHide );
1288
- if (FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_MAXIMIZED ) > 0 ) FLAG_SET (flags , RGFW_windowMaximize );
1283
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNDECORATED )) FLAG_SET (flags , RGFW_windowNoBorder );
1284
+ if (! FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_RESIZABLE )) FLAG_SET (flags , RGFW_windowNoResize );
1285
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_TRANSPARENT )) FLAG_SET (flags , RGFW_windowTransparent );
1286
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_FULLSCREEN_MODE )) FLAG_SET (flags , RGFW_windowFullscreen );
1287
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_HIDDEN )) FLAG_SET (flags , RGFW_windowHide );
1288
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_MAXIMIZED )) FLAG_SET (flags , RGFW_windowMaximize );
1289
1289
1290
1290
// NOTE: Some OpenGL context attributes must be set before window creation
1291
1291
// Check selection OpenGL version
@@ -1305,9 +1305,9 @@ int InitPlatform(void)
1305
1305
RGFW_setGLHint (RGFW_glMinor , 3 );
1306
1306
}
1307
1307
1308
- if (FLAG_CHECK (CORE .Window .flags , FLAG_MSAA_4X_HINT ) > 0 ) RGFW_setGLHint (RGFW_glSamples , 4 );
1308
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_MSAA_4X_HINT )) RGFW_setGLHint (RGFW_glSamples , 4 );
1309
1309
1310
- if (!FLAG_CHECK (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) FLAG_SET (flags , RGFW_windowFocusOnShow | RGFW_windowFocus );
1310
+ if (!FLAG_IS_SET (CORE .Window .flags , FLAG_WINDOW_UNFOCUSED )) FLAG_SET (flags , RGFW_windowFocusOnShow | RGFW_windowFocus );
1311
1311
1312
1312
platform .window = RGFW_createWindow (CORE .Window .title , RGFW_RECT (0 , 0 , CORE .Window .screen .width , CORE .Window .screen .height ), flags );
1313
1313
platform .mon .mode .area .w = 0 ;
@@ -1331,7 +1331,7 @@ int InitPlatform(void)
1331
1331
// If so, rcore_desktop_sdl should be updated too
1332
1332
//SetupFramebuffer(CORE.Window.display.width, CORE.Window.display.height);
1333
1333
1334
- if (FLAG_CHECK (CORE .Window .flags , FLAG_VSYNC_HINT )) RGFW_window_swapInterval (platform .window , 1 );
1334
+ if (FLAG_IS_SET (CORE .Window .flags , FLAG_VSYNC_HINT )) RGFW_window_swapInterval (platform .window , 1 );
1335
1335
RGFW_window_makeCurrent (platform .window );
1336
1336
1337
1337
// Check surface and context activation
0 commit comments