MCPcopy Create free account
hub / github.com/crossuo/crossuo / GetDisplaySize

Function GetDisplaySize

src/Wisp/WispWindow.cpp:635–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}; // namespace Wisp
634
635void GetDisplaySize(int *x, int *y)
636{
637#if SDL_VERSION_ATLEAST(2, 0, 5)
638 SDL_Rect r;
639 SDL_GetDisplayUsableBounds(0, &r);
640 if (x != nullptr)
641 {
642 *x = r.w;
643 }
644 if (y != nullptr)
645 {
646 *y = r.h;
647 }
648#else
649 SDL_DisplayMode dm;
650 SDL_GetCurrentDisplayMode(0, &dm);
651 if (x != nullptr)
652 {
653 *x = dm.w;
654 }
655 if (y != nullptr)
656 {
657 *y = dm.h;
658 }
659#endif
660}

Callers 7

UpdateHeightMethod · 0.85
UpdateContentMethod · 0.85
OnLeftMouseButtonUpMethod · 0.85
DrawPage6Method · 0.85
DrawPage7Method · 0.85
UpdateSizeMethod · 0.85
LoadMethod · 0.85

Calls 2

Tested by

no test coverage detected