From 97feac5342420653bb1f4a5fbca68a5aae6b09a8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 23 Feb 2012 20:59:26 +0100 Subject: IPHONE: Add a constructor to VideoContext. --- backends/platform/iphone/iphone_common.h | 6 ++++++ backends/platform/iphone/iphone_video.mm | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'backends/platform/iphone') diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h index 18821e697f..f5111fbe8c 100644 --- a/backends/platform/iphone/iphone_common.h +++ b/backends/platform/iphone/iphone_common.h @@ -56,6 +56,12 @@ enum GraphicsModes { }; struct VideoContext { + VideoContext() : screenWidth(), screenHeight(), overlayVisible(false), + overlayWidth(), overlayHeight(), mouseX(), mouseY(), + mouseHotspotX(), mouseHotspotY(), mouseWidth(), mouseHeight(), + mouseIsVisible(), graphicsMode(kGraphicsModeLinear), shakeOffsetY() { + } + // Game screen state uint screenWidth, screenHeight; diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm index 387ed7252f..4442552c0d 100644 --- a/backends/platform/iphone/iphone_video.mm +++ b/backends/platform/iphone/iphone_video.mm @@ -225,10 +225,6 @@ const char *iPhone_getDocumentsDir() { _overlayTexture = 0; _mouseCursorTexture = 0; - memset(&_videoContext, 0, sizeof(_videoContext)); - _videoContext.graphicsMode = kGraphicsModeLinear; - _videoContext.overlayVisible = false; - _gameScreenVertCoords[0] = _gameScreenVertCoords[1] = _gameScreenVertCoords[2] = _gameScreenVertCoords[3] = _gameScreenVertCoords[4] = _gameScreenVertCoords[5] = -- cgit v1.2.3