diff --git a/native/tools/simulator/frameworks/runtime-src/Classes/Game.cpp b/native/tools/simulator/frameworks/runtime-src/Classes/Game.cpp index 2f4e836994..991633704c 100644 --- a/native/tools/simulator/frameworks/runtime-src/Classes/Game.cpp +++ b/native/tools/simulator/frameworks/runtime-src/Classes/Game.cpp @@ -35,8 +35,8 @@ #include "SimulatorApp.h" #include "windows.h" #elif (CC_PLATFORM == CC_PLATFORM_MAC_OSX) - #include "../proj.ios_mac/mac/SimulatorApp.h" #include + #include "../proj.ios_mac/mac/SimulatorApp.h" #endif #include "ide-support/CodeIDESupport.h" @@ -44,7 +44,6 @@ #include "runtime/ConfigParser.h" #include "runtime/Runtime.h" - using namespace std; Game::Game() { } @@ -56,15 +55,15 @@ Game::~Game() { int Game::init() { SimulatorApp::getInstance()->run(); - int windowWidth = SimulatorApp::getInstance()->getWidth(); - int windowHeight = SimulatorApp::getInstance()->getHegith(); + int windowWidth = SimulatorApp::getInstance()->getWidth(); + int windowHeight = SimulatorApp::getInstance()->getHegith(); #if (CC_PLATFORM == CC_PLATFORM_WINDOWS) int windowPositionX = (GetSystemMetrics(SM_CXSCREEN) - windowWidth) / 2; int windowPositionY = (GetSystemMetrics(SM_CYSCREEN) - windowHeight) / 2; #elif (CC_PLATFORM == CC_PLATFORM_MAC_OSX) - auto mainDisplayId = CGMainDisplayID(); - int windowPositionX = (CGDisplayPixelsWide(mainDisplayId) - windowWidth) / 2; - int windowPositionY = (CGDisplayPixelsHigh(mainDisplayId) - windowHeight) / 2; + auto mainDisplayId = CGMainDisplayID(); + int windowPositionX = (CGDisplayPixelsWide(mainDisplayId) - windowWidth) / 2; + int windowPositionY = (CGDisplayPixelsHigh(mainDisplayId) - windowHeight) / 2; #endif createWindow("My game", windowPositionX, windowPositionY, SimulatorApp::getInstance()->getWidth(), SimulatorApp::getInstance()->getHegith(),