当前位置:网站首页>Cocos2dx screen adaptation
Cocos2dx screen adaptation
2022-07-05 04:56:00 【Meteor spot】
Size screenSize = glview->getFrameSize();
if (screenSize.width < screenSize.height)
{
glview->setFrameSize(screenSize.height, screenSize.width);
screenSize = glview->getFrameSize();
}
if (screenSize.width / screenSize.height >= 1280.f / 720.f) {
glview->setDesignResolutionSize(1280, 720, ResolutionPolicy::FIXED_HEIGHT);
}
else{
glview->setDesignResolutionSize(1280, 720, ResolutionPolicy::SHOW_ALL);
}
边栏推荐
- Basic knowledge points
- 【acwing】528. cheese
- Unity3d learning notes
- 2020-10-27
- 【acwing】837. Number of connected block points
- Thinking of 2022 American College Students' mathematical modeling competition
- Solution of circular dependency
- [groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
- C4D simple cloth (version above R21)
- AutoCAD - stretching
猜你喜欢

Special information | finance, accounting, audit - 22.1.23

AutoCAD - set layer

质量体系建设之路的分分合合

Unity get component

Solution of circular dependency

数论函数及其求和 待更新
![[groovy] closure (closure as function parameter | code example)](/img/a6/a4ed401acfb61f85eb08daa15a8a80.jpg)
[groovy] closure (closure as function parameter | code example)

Wan broadband access technology V EPON Technology

質量體系建設之路的分分合合

Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
随机推荐
Flink cluster configuration
【Leetcode】1352. 最后 K 个数的乘积
中国针状焦行业发展研究与投资价值报告(2022版)
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
【acwing】836. Merge sets
This article is good
Unity3d learning notes
Recherche de mots pour leetcode (solution rétrospective)
Inline built-in function
PR first time
669. Prune binary search tree ●●
#775 Div.1 C. Tyler and Strings 组合数学
775 Div.1 C. Tyler and strings combinatorial mathematics
On-off and on-off of quality system construction
Wan broadband access technology V EPON Technology
China as resin Market Research and investment forecast report (2022 Edition)
The difference between heap and stack
AutoCAD - set layer
质量体系建设之路的分分合合
jmeter -- 分布式压测