当前位置:网站首页>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);
}
边栏推荐
- Solutions and answers for the 2021 Shenzhen cup
- Unity shot tracking object
- 3dsmax common commands
- Unity and database
- Number theoretic function and its summation to be updated
- Minor spanning tree
- Flutter tips: various fancy nesting of listview and pageview
- Unity enables mobile phone vibration
- [groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
- C iterator
猜你喜欢
Recherche de mots pour leetcode (solution rétrospective)
Flutter tips: various fancy nesting of listview and pageview
2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis
Panel panel of UI
stm32Cubemx(8):RTC和RTC唤醒中断
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
Unity find the coordinates of a point on the circle
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
Leetcode word search (backtracking method)
随机推荐
AutoCAD - graphic input and output
Emlog blog theme template source code simple good-looking responsive
C4D simple cloth (version above R21)
django连接数据库报错,这是什么原因
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
How to choose a panoramic camera that suits you?
Panel panel of UI
Rip notes [rip message security authentication, increase of rip interface measurement]
mysql審計日志歸檔
JMeter -- distributed pressure measurement
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
Recherche de mots pour leetcode (solution rétrospective)
中国聚氨酯硬泡市场调研与投资预测报告(2022版)
2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
AutoCAD - command repetition, undo and redo
Unity check whether the two objects have obstacles by ray
Understand encodefloatrgba and decodefloatrgba
AutoCAD - Center zoom
Detailed introduction of OSPF header message
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?