Browse Source

Review UWP project -WIP-

pull/1202/head
raysan5 4 years ago
parent
commit
8d51ad567f
5 changed files with 50 additions and 10 deletions
  1. +1
    -1
      projects/VS2017.UWP/raylib.App.UWP/App.cpp
  2. +4
    -4
      projects/VS2017.UWP/raylib.App.UWP/App.h
  3. +1
    -1
      projects/VS2017.UWP/raylib.App.UWP/BaseApp.h
  4. +40
    -0
      projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj.filters
  5. +4
    -4
      src/core.c

+ 1
- 1
projects/VS2017.UWP/raylib.App.UWP/App.cpp View File

@ -5,7 +5,7 @@
using namespace raylibUWP; using namespace raylibUWP;
// The main function creates an IFrameworkViewSource for our app, and runs the app. // The main function creates an IFrameworkViewSource for our app, and runs the app
[Platform::MTAThread] [Platform::MTAThread]
int main(Platform::Array<Platform::String^>^) int main(Platform::Array<Platform::String^>^)
{ {

+ 4
- 4
projects/VS2017.UWP/raylib.App.UWP/App.h View File

@ -16,10 +16,10 @@ namespace raylibUWP
{ {
ref class App sealed : public BaseApp ref class App sealed : public BaseApp
{ {
public: public:
App();
// IFrameworkView Methods. App();
void Update() override; void Update() override;
}; };
} }

+ 1
- 1
projects/VS2017.UWP/raylib.App.UWP/BaseApp.h View File

@ -119,7 +119,7 @@ public:
handle = (EGLNativeWindowType)window; handle = (EGLNativeWindowType)window;
InitWindow(width, height, nb">NULL); InitWindow(width, height, sa">"raylib game example");
} }
virtual void Load(Platform::String^ entryPoint) {} virtual void Load(Platform::String^ entryPoint) {}

+ 40
- 0
projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj.filters View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="App.cpp" />
<ClCompile Include="pch.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="App.h" />
<ClInclude Include="BaseApp.h" />
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\Logo.scale-100.png">
<Filter>Logo</Filter>
</Image>
<Image Include="Assets\SmallLogo.scale-100.png">
<Filter>Logo</Filter>
</Image>
<Image Include="Assets\StoreLogo.scale-100.png">
<Filter>Logo</Filter>
</Image>
<Image Include="Assets\WideLogo.scale-100.png">
<Filter>Logo</Filter>
</Image>
<Image Include="Assets\SplashScreen.scale-100.png">
<Filter>Logo</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Filter Include="Logo">
<UniqueIdentifier>{cdf72d55-f249-4ad6-9a91-f8a084e64933}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

+ 4
- 4
src/core.c View File

@ -3149,8 +3149,8 @@ static bool InitGraphicsDevice(int width, int height)
} }
// Get EGL device window size // Get EGL device window size
eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_WIDTH, &CORE.Window.screen.width); eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_WIDTH, &CORE.Window.display.width);
eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_HEIGHT, &CORE.Window.screen.height); eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_HEIGHT, &CORE.Window.display.height);
#endif // PLATFORM_UWP #endif // PLATFORM_UWP
@ -3263,8 +3263,8 @@ static bool InitGraphicsDevice(int width, int height)
else else
{ {
// Grab the width and height of the surface // Grab the width and height of the surface
o">//eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_WIDTH, &CORE.Window.render.width); CORE.Window.render.width = CORE.Window.display.width;
o">//eglQuerySurface(CORE.Window.device, CORE.Window.surface, EGL_HEIGHT, &CORE.Window.render.height); CORE.Window.render.height = CORE.Window.display.height;
TRACELOG(LOG_INFO, "DISPLAY: Device initialized successfully"); TRACELOG(LOG_INFO, "DISPLAY: Device initialized successfully");
TRACELOG(LOG_INFO, " > Display size: %i x %i", CORE.Window.display.width, CORE.Window.display.height); TRACELOG(LOG_INFO, " > Display size: %i x %i", CORE.Window.display.width, CORE.Window.display.height);

||||||
x
 
000:0
Loading…
Cancel
Save