当前位置:网站首页>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);
}
边栏推荐
- 【acwing】528. cheese
- Error statuslogger log4j2 could not find a logging implementation
- 2021-10-29
- Detailed explanation of the ranking of the best universities
- 2021 electrician cup idea + code - photovoltaic building integration plate index development trend analysis and prediction: prediction planning issues
- 2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
- 2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
- MD5 bypass
- Unity find the coordinates of a point on the circle
- Redis has four methods for checking big keys, which are necessary for optimization
猜你喜欢

Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation

Unity parallax infinite scrolling background

Solutions and answers for the 2021 Shenzhen cup

Unity3d learning notes

Introduction to JVM principle and process
![[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)](/img/aa/3c8b7b27e322417777d1315b9a5a8f.jpg)
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)

AutoCAD - window zoom

【acwing】836. Merge sets

JVM 原理和流程简介

Detailed introduction of OSPF header message
随机推荐
【acwing】837. Number of connected block points
C # perspective following
Redis has four methods for checking big keys, which are necessary for optimization
【Leetcode】1352. 最后 K 个数的乘积
UE4/UE5 虚幻引擎,材质篇,纹理,Compression and Memory压缩和内存
AutoCAD - feature matching
MySQL audit log Archive
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
AutoCAD - isometric annotation
Common database statements in unity
Basic knowledge points of dictionary
Séparation et combinaison de la construction du système qualité
2021 electrician cup (the 12th "China Society of electrical engineering Cup" National Undergraduate electrician mathematical modeling) detailed ideas + codes + references
AutoCAD - command repetition, undo and redo
The difference between heap and stack
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
GameObject class and transform class of unity
Unity writes timetables (without UI)
Autocad-- dynamic zoom
Thinking of 2022 American College Students' mathematical modeling competition