diff options
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp index 7e7b3d2e3d4..0abea7fa28e 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp @@ -39,6 +39,8 @@ KX_BlenderCanvas::KX_BlenderCanvas(struct wmWindow *win, RAS_Rect &rect, struct m_win(win), m_frame_rect(rect) { + // initialize area so that it's available for game logic on frame 1 (ImageViewport) + m_area_rect = rect; // area boundaries needed for mouse coordinates in Letterbox framing mode m_area_left = ar->winrct.xmin; m_area_top = ar->winrct.ymax; diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp index df1bf31ec12..82950f571f9 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp @@ -52,6 +52,11 @@ GPC_Canvas::GPC_Canvas( m_height(height), m_bannersEnabled(false) { + // initialize area so that it's available for game logic on frame 1 (ImageViewport) + m_displayarea.m_x1 = 0; + m_displayarea.m_y1 = 0; + m_displayarea.m_x2 = width; + m_displayarea.m_y2 = height; } |