Browse Source

Windows Build

Josh Engebretson 11 years ago
parent
commit
eaf69d18a1

+ 6 - 0
Source/Atomic/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -374,6 +374,12 @@ void Graphics::SetWindowPosition(int x, int y)
     SetWindowPosition(IntVector2(x, y));
 }
 
+void Graphics::RaiseWindow()
+{
+    if (impl_->window_)
+        SDL_RaiseWindow(impl_->window_);
+}
+
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer, int multiSample)
 {
     PROFILE(SetScreenMode);

+ 1 - 0
Source/Atomic/Graphics/Direct3D9/D3D9Graphics.h

@@ -92,6 +92,7 @@ public:
     void SetWindowPosition(const IntVector2& position);
     /// Set window position. Sets initial position if window is not created yet.
     void SetWindowPosition(int x, int y);
+    void RaiseWindow();
     /// Set screen mode. Return true if successful.
     bool SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer, int multiSample);
     /// Set screen resolution only. Return true if successful.

+ 2 - 2
Source/ThirdParty/SDL/src/video/windows/SDL_windowsvideo.c

@@ -93,8 +93,8 @@ WIN_CreateDevice(int devindex)
         
         // Urho3D: call SetProcessDPIAware if available to prevent Windows 8.1 from performing unwanted scaling
         data->SetProcessDPIAware = (BOOL (WINAPI *)()) SDL_LoadFunction(data->userDLL, "SetProcessDPIAware");
-        if (data->SetProcessDPIAware)
-            data->SetProcessDPIAware();
+        //if (data->SetProcessDPIAware)
+        //    data->SetProcessDPIAware();
     }
 
     /* Set the function pointers */

+ 3 - 0
Source/ThirdParty/TurboBadger/tb_system_win.cpp

@@ -52,6 +52,8 @@ int TBSystem::GetPixelsPerLine()
 
 int TBSystem::GetDPI()
 {
+	return 96;
+	/*
 	HDC hdc = GetDC(nullptr);
 	int DPI_x = GetDeviceCaps(hdc, LOGPIXELSX);
 	ReleaseDC(nullptr, hdc);
@@ -59,6 +61,7 @@ int TBSystem::GetDPI()
 	DPI_x *= 2;
 #endif
 	return DPI_x;
+	*/
 }
 
 }; // namespace tb

+ 1 - 1
Source/Tools/JSBind/modules/Graphics.json

@@ -6,7 +6,7 @@
 				 "Viewport", "Renderer", "Octree", "Zone", "StaticModel", "Camera", "Light", "RenderPath",
 				 "Animation", "AnimatedModel", "AnimationController", "AnimationState", "BillboardSet", "CustomGeometry",
 				 "DebugRenderer", "DecalSet", "OcclusionBuffer", "ParticleEffect", "ParticleEmitter",
-				 "RenderSurface", "Shader", "ShaderPrecache", "ShaderProgram", "ShaderVariation", 
+				 "RenderSurface", "Shader", "ShaderPrecache", "ShaderVariation", 
 				 "Skybox", "StaticModelGroup", "Pass", "Technique", "Terrain", "TerrainPatch", 
 				 "Texture3D", "TextureCube", "View"],
 	"overloads" : {