MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / setupDesignResolution

Function setupDesignResolution

Source/AppDelegate.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91static void setupDesignResolution(GLView* glView)
92{
93 auto screen_size = glView->getFrameSize();
94 ResolutionPolicy resPolicy;
95
96 if (screen_size.height / designResolutionSize.height <= screen_size.width / designResolutionSize.width)
97 {
98 resPolicy = ResolutionPolicy::FIXED_HEIGHT;
99 }
100 else
101 {
102 resPolicy = ResolutionPolicy::FIXED_WIDTH;
103 }
104
105 glView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, resPolicy);
106}
107
108#ifdef AX_PLATFORM_PC
109static void onGLFWwindowSizeCallback(GLFWwindow*, int w, int h)

Callers 2

onGLFWwindowSizeCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected