mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-27 17:11:37 +00:00
Fix Xbox link error from IsRectEmpty
(cherry picked from commit 376a3cd100)
This commit is contained in:
committed by
Sam Lantinga
parent
1ee9a437f9
commit
2001a891c4
@@ -333,6 +333,11 @@ void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect)
|
||||
winrect->bottom = sdlrect->y + sdlrect->h - 1;
|
||||
}
|
||||
|
||||
BOOL WIN_IsRectEmpty(const RECT *rect)
|
||||
{
|
||||
/* Calculating this manually because UWP and Xbox do not support Win32 IsRectEmpty. */
|
||||
return (rect->right <= rect->left) || (rect->bottom <= rect->top);
|
||||
}
|
||||
#endif /* defined(__WIN32__) || defined(__WINRT__) || defined(__GDK__) */
|
||||
|
||||
/*
|
||||
|
||||
@@ -153,6 +153,9 @@ extern BOOL WIN_IsEqualIID(REFIID a, REFIID b);
|
||||
extern void WIN_RECTToRect(const RECT *winrect, SDL_Rect *sdlrect);
|
||||
extern void WIN_RectToRECT(const SDL_Rect *sdlrect, RECT *winrect);
|
||||
|
||||
/* Returns SDL_TRUE if the rect is empty */
|
||||
extern BOOL WIN_IsRectEmpty(const RECT *rect);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user