Skip to content
Permalink
Browse files

For the non-vulkan backends, zero display rotation settings just to b…

…e sure.
  • Loading branch information...
hrydgard committed Jun 24, 2019
1 parent 452dce0 commit aff429ee090d0a5b768d6d07166bc59e9197e60d
Showing with 13 additions and 0 deletions.
  1. +4 −0 Windows/GPU/D3D11Context.cpp
  2. +5 −0 Windows/GPU/D3D9Context.cpp
  3. +4 −0 android/jni/AndroidJavaGLContext.cpp
@@ -6,6 +6,7 @@
#include <cassert>

#include "base/logging.h"
#include "Base/display.h"
#include "util/text/utf8.h"
#include "i18n/i18n.h"

@@ -51,6 +52,9 @@ void D3D11Context::SwapInterval(int interval) {

HRESULT D3D11Context::CreateTheDevice(IDXGIAdapter *adapter) {
bool windowed = true;
// D3D11 has no need for display rotation.
g_display_rotation = DisplayRotation::ROTATE_0;
g_display_rot_matrix.setIdentity();
#if defined(_DEBUG) && !defined(_M_ARM) && !defined(_M_ARM64)
UINT createDeviceFlags = D3D11_CREATE_DEVICE_DEBUG;
#else
@@ -6,6 +6,7 @@
#include "gfx/d3d9_state.h"

#include "base/logging.h"
#include "base/display.h"
#include "util/text/utf8.h"
#include "i18n/i18n.h"

@@ -62,6 +63,10 @@ bool D3D9Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) {
bool windowed = true;
hWnd_ = wnd;

// D3D9 has no need for display rotation.
g_display_rotation = DisplayRotation::ROTATE_0;
g_display_rot_matrix.setIdentity();

DIRECT3DCREATE9EX g_pfnCreate9ex;

hD3D9_ = LoadLibrary(TEXT("d3d9.dll"));
@@ -1,6 +1,7 @@
#include <cassert>

#include "AndroidJavaGLContext.h"
#include "base/display.h"
#include "base/NativeApp.h"
#include "gfx_es2/gpu_features.h"
#include "Core/ConfigValues.h"
@@ -13,6 +14,9 @@ AndroidJavaEGLGraphicsContext::AndroidJavaEGLGraphicsContext() {
bool AndroidJavaEGLGraphicsContext::InitFromRenderThread(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) {
ILOG("AndroidJavaEGLGraphicsContext::InitFromRenderThread");
CheckGLExtensions();
// OpenGL handles rotated rendering in the driver.
g_display_rotation = DisplayRotation::ROTATE_0;
g_display_rot_matrix.setIdentity();
draw_ = Draw::T3DCreateGLContext();
renderManager_ = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
bool success = draw_->CreatePresets();

0 comments on commit aff429e

Please sign in to comment.
You can’t perform that action at this time.