Changeset 1108 for trunk/src/video.cpp
- Timestamp:
- Dec 10, 2011, 3:02:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/video.cpp
r1081 r1108 36 36 private: 37 37 static mat4 proj_matrix, view_matrix; 38 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__39 38 static ivec2 saved_viewport; 40 #endif41 39 }; 42 40 … … 44 42 mat4 VideoData::view_matrix; 45 43 46 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__47 44 ivec2 VideoData::saved_viewport(0, 0); 48 #endif49 45 50 46 /* … … 66 62 /* Initialise OpenGL */ 67 63 glViewport(0, 0, size.x, size.y); 68 69 #if defined __ANDROID__ || defined __CELLOS_LV2__ || defined __APPLE__70 64 VideoData::saved_viewport = size; 71 #endif72 65 73 66 glClearColor(0.1f, 0.2f, 0.3f, 1.0f); … … 179 172 ivec2 Video::GetSize() 180 173 { 181 #if defined __ANDROID__ 174 /* GetSize() is called too often on the game thread; we cannot rely on 175 * the GL context at this point */ 176 #if 1 182 177 return VideoData::saved_viewport; 183 178 #elif defined __CELLOS_LV2__ 184 179 // FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions 185 return VideoData::saved_viewport;186 #elif defined __APPLE__187 return VideoData::saved_viewport;188 180 #else 189 181 GLint v[4];
Note: See TracChangeset
for help on using the changeset viewer.