|
|
@@ -580,7 +580,7 @@ int getKey(unichar keyCode);
|
|
|
@end
|
|
|
|
|
|
|
|
|
-dobule getMachTimeInMilliseconds()
|
|
|
+double getMachTimeInMilliseconds()
|
|
|
{
|
|
|
static const double kOneMillion = 1000 * 1000;
|
|
|
static mach_timebase_info_data_t s_timebase_info;
|
|
|
@@ -868,7 +868,7 @@ unsigned int Platform::getDisplayHeight()
|
|
|
return size.height;
|
|
|
}
|
|
|
|
|
|
-dobule Platform::getAbsoluteTime()
|
|
|
+double Platform::getAbsoluteTime()
|
|
|
{
|
|
|
__timeAbsolute = getMachTimeInMilliseconds();
|
|
|
return __timeAbsolute;
|
|
|
@@ -931,22 +931,22 @@ void Platform::touchEventInternal(Touch::TouchEvent evt, int x, int y, unsigned
|
|
|
Game::getInstance()->touchEvent(evt, x, y, contactIndex);
|
|
|
}
|
|
|
|
|
|
-void Platform::keyEventInternal(Keyboard::KeyEvent evt, int key)
|
|
|
-{
|
|
|
- if (!Form::keyEventInternal(evt, key))
|
|
|
- Game::getInstance()->keyEvent(evt, key);
|
|
|
-}
|
|
|
-
|
|
|
-bool Platform::mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
|
|
|
-{
|
|
|
- if (Form::mouseEventInternal(evt, x, y, wheelDelta))
|
|
|
- {
|
|
|
- return true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return Game::getInstance()->mouseEvent(evt, x, y, wheelDelta);
|
|
|
- }
|
|
|
+void Platform::keyEventInternal(Keyboard::KeyEvent evt, int key)
|
|
|
+{
|
|
|
+ if (!Form::keyEventInternal(evt, key))
|
|
|
+ Game::getInstance()->keyEvent(evt, key);
|
|
|
+}
|
|
|
+
|
|
|
+bool Platform::mouseEventInternal(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
|
|
|
+{
|
|
|
+ if (Form::mouseEventInternal(evt, x, y, wheelDelta))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return Game::getInstance()->mouseEvent(evt, x, y, wheelDelta);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void Platform::sleep(long ms)
|