summaryrefslogtreecommitdiffhomepage
path: root/projects/VS2017.UWP/raylib.App.UWP
diff options
context:
space:
mode:
authorReece Mackie <[email protected]>2019-04-27 19:33:51 +0100
committerRay <[email protected]>2019-04-27 20:33:51 +0200
commit2de1f318212dbceb71db6be053be995208748f2a (patch)
treea357bfc6e8b825ebfd26098a32bc11efa2c8dc8e /projects/VS2017.UWP/raylib.App.UWP
parentf37e55a77bd6177dbaea4d7f484961c09104e104 (diff)
downloadraylib-2de1f318212dbceb71db6be053be995208748f2a.tar.gz
raylib-2de1f318212dbceb71db6be053be995208748f2a.zip
UWP Support Overhaul (#819)
* Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Working build * Fix build again, stop deleting files * Hotfix crash, needs investigating * Remove VS2015.UWP, I cannot update the project * Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet. * Implemented a ton more things, added BaseApp.h to provide common code to UWP apps. * Remove constant window dimensions * Enable and Disable cursor support. * Actually use mouse delta * Gamepad Support * Cleaning and small tweaks * Restore original example. * Update comment * Use 'Messages' to handle the cursor functions so code is more portable. * Comment * Comment unused message fields and use vector for mouse pos instead. * Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h * Tested some desktop stuff and added projection matrix updates for window resizing. * Fixed big bad mouse bug * Fix alt buttons and add hack to combat flickery key presses (far from perfect) * Remove debug code * Final commit * Well, so I thought * Wow, i am bad * Remove packages folder * Remove useless include * Apply requested changes and fix linux build * Try to stop packages folder * Have we fixed the formatting properly? * Third time's the charm? * Where did this come from? * Re-fix * Autoformat is gonna kill * Fixed XBOX ONE Support * Fix tabs
Diffstat (limited to 'projects/VS2017.UWP/raylib.App.UWP')
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/App.cpp78
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/App.h25
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Assets/Logo.scale-100.pngbin0 -> 801 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Assets/SmallLogo.scale-100.pngbin0 -> 329 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Assets/SplashScreen.scale-100.pngbin0 -> 2146 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Assets/StoreLogo.scale-100.pngbin0 -> 429 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Assets/WideLogo.scale-100.pngbin0 -> 2150 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/BaseApp.h567
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/Package.appxmanifest26
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/packages.config4
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/pch.cpp1
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/pch.h16
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.TemporaryKey.pfxbin0 -> 2512 bytes
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.filters42
-rw-r--r--projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj151
15 files changed, 910 insertions, 0 deletions
diff --git a/projects/VS2017.UWP/raylib.App.UWP/App.cpp b/projects/VS2017.UWP/raylib.App.UWP/App.cpp
new file mode 100644
index 00000000..ae137ed2
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/App.cpp
@@ -0,0 +1,78 @@
+#include "pch.h"
+#include "app.h"
+
+#include "raylib.h"
+
+using namespace raylibUWP;
+
+// The main function creates an IFrameworkViewSource for our app, and runs the app.
+[Platform::MTAThread]
+int main(Platform::Array<Platform::String^>^)
+{
+ auto appSource = ref new ApplicationSource<App>();
+ CoreApplication::Run(appSource);
+
+ return 0;
+}
+
+App::App()
+{
+ //This does not work... need to fix this.
+ SetConfigFlags(0);
+
+ Setup(640, 480);
+}
+
+static int posX = 100;
+static int posY = 100;
+static int gTime = 0;
+
+// This method is called every frame
+void App::Update()
+{
+ //return;
+ // Draw
+ BeginDrawing();
+
+ ClearBackground(RAYWHITE);
+
+ posX += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_X) * 5;
+ posY += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_Y) * -5;
+
+ DrawRectangle(posX, posY, 400, 100, RED);
+
+ DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE);
+
+ auto mPos = GetMousePosition();
+
+ DrawCircle(mPos.x, mPos.y, 40, BLUE);
+
+ if (IsKeyDown(KEY_S)) DrawCircle(100, 100, 100, BLUE);
+
+ if (IsKeyPressed(KEY_A))
+ {
+ posX -= 50;
+ EnableCursor();
+ }
+
+ if (IsKeyPressed(KEY_D))
+ {
+ posX += 50;
+ DisableCursor();
+ }
+
+ if (IsKeyDown(KEY_LEFT_ALT))
+ DrawRectangle(250, 250, 20, 20, BLACK);
+ if (IsKeyDown(KEY_BACKSPACE))
+ DrawRectangle(280, 250, 20, 20, BLACK);
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
+ DrawRectangle(280, 250, 20, 20, BLACK);
+
+ static int pos = 0;
+ pos -= GetMouseWheelMove();
+
+ DrawRectangle(280, pos + 50, 20, 20, BLACK);
+ DrawRectangle(250, 280 + (gTime++ % 60), 10, 10, PURPLE);
+
+ EndDrawing();
+} \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/App.h b/projects/VS2017.UWP/raylib.App.UWP/App.h
new file mode 100644
index 00000000..26c1d400
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/App.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <string>
+
+#include "pch.h"
+
+//Define what header we use for BaseApp.h
+#define PCH "pch.h"
+
+//Enable hold hack
+#define HOLDHACK
+
+#include "BaseApp.h"
+
+namespace raylibUWP
+{
+ ref class App sealed : public BaseApp
+ {
+ public:
+ App();
+
+ // IFrameworkView Methods.
+ void Update() override;
+ };
+}
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Assets/Logo.scale-100.png b/projects/VS2017.UWP/raylib.App.UWP/Assets/Logo.scale-100.png
new file mode 100644
index 00000000..e26771cb
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Assets/Logo.scale-100.png
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Assets/SmallLogo.scale-100.png b/projects/VS2017.UWP/raylib.App.UWP/Assets/SmallLogo.scale-100.png
new file mode 100644
index 00000000..1eb0d9d5
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Assets/SmallLogo.scale-100.png
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Assets/SplashScreen.scale-100.png b/projects/VS2017.UWP/raylib.App.UWP/Assets/SplashScreen.scale-100.png
new file mode 100644
index 00000000..c951e031
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Assets/SplashScreen.scale-100.png
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Assets/StoreLogo.scale-100.png b/projects/VS2017.UWP/raylib.App.UWP/Assets/StoreLogo.scale-100.png
new file mode 100644
index 00000000..dcb67271
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Assets/StoreLogo.scale-100.png
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Assets/WideLogo.scale-100.png b/projects/VS2017.UWP/raylib.App.UWP/Assets/WideLogo.scale-100.png
new file mode 100644
index 00000000..9dd94b62
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Assets/WideLogo.scale-100.png
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h b/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h
new file mode 100644
index 00000000..e27909e2
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/BaseApp.h
@@ -0,0 +1,567 @@
+/**********************************************************************************************
+*
+* raylib.BaseApp - UWP App generic code for managing interface between C and C++
+*
+* LICENSE: zlib/libpng
+*
+* CONFIGURATION:
+*
+* #define PCH
+* This defines what header is the PCH and needs to be included
+*
+* #define HOLDHACK
+* This enables a hack to fix flickering key presses (Temporary)
+*
+* Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
+*
+* This software is provided "as-is", without any express or implied warranty. In no event
+* will the authors be held liable for any damages arising from the use of this software.
+*
+* Permission is granted to anyone to use this software for any purpose, including commercial
+* applications, and to alter it and redistribute it freely, subject to the following restrictions:
+*
+* 1. The origin of this software must not be misrepresented; you must not claim that you
+* wrote the original software. If you use this software in a product, an acknowledgment
+* in the product documentation would be appreciated but is not required.
+*
+* 2. Altered source versions must be plainly marked as such, and must not be misrepresented
+* as being the original software.
+*
+* 3. This notice may not be removed or altered from any source distribution.
+*
+**********************************************************************************************/
+
+#pragma once
+
+#if defined(PCH)
+#include PCH
+#endif
+
+#include <chrono>
+#include <memory>
+#include <wrl.h>
+
+//EGL
+#include <EGL/eglplatform.h>
+
+#include "raylib.h"
+#include "utils.h"
+
+using namespace Windows::ApplicationModel::Core;
+using namespace Windows::ApplicationModel::Activation;
+using namespace Windows::UI::Core;
+using namespace Windows::UI::Input;
+using namespace Windows::Devices::Input;
+using namespace Windows::Foundation;
+using namespace Windows::Foundation::Collections;
+using namespace Windows::Gaming::Input;
+using namespace Windows::Graphics::Display;
+using namespace Microsoft::WRL;
+using namespace Platform;
+
+extern "C" { EGLNativeWindowType uwpWindow; };
+
+/*
+TODO list:
+ - Cache reference to our CoreWindow?
+ - Implement gestures support
+*/
+
+// Stand-ins for "core.c" variables
+#define MAX_GAMEPADS 4 // Max number of gamepads supported
+#define MAX_GAMEPAD_BUTTONS 32 // Max bumber of buttons supported (per gamepad)
+#define MAX_GAMEPAD_AXIS 8 // Max number of axis supported (per gamepad)
+
+//Mouse cursor locking
+bool cursorLocked = false;
+Vector2 mouseDelta = {0, 0};
+
+//Our mouse cursor
+CoreCursor ^regularCursor = ref new CoreCursor(CoreCursorType::Arrow, 0); // The "visible arrow" cursor type
+
+//Base app implementation
+ref class BaseApp : public Windows::ApplicationModel::Core::IFrameworkView
+{
+public:
+
+ // IFrameworkView Methods.
+ virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView)
+ {
+ // Register event handlers for app lifecycle. This example includes Activated, so that we
+ // can make the CoreWindow active and start rendering on the window.
+ applicationView->Activated += ref new TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>(this, &BaseApp::OnActivated);
+
+ // Logic for other event handlers could go here.
+ // Information about the Suspending and Resuming event handlers can be found here:
+ // http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
+
+ CoreApplication::Resuming += ref new EventHandler<Platform::Object^>(this, &BaseApp::OnResuming);
+ }
+
+ virtual void SetWindow(Windows::UI::Core::CoreWindow^ window)
+ {
+ window->SizeChanged += ref new TypedEventHandler<CoreWindow^, WindowSizeChangedEventArgs^>(this, &BaseApp::OnWindowSizeChanged);
+ window->VisibilityChanged += ref new TypedEventHandler<CoreWindow^, VisibilityChangedEventArgs^>(this, &BaseApp::OnVisibilityChanged);
+ window->Closed += ref new TypedEventHandler<CoreWindow^, CoreWindowEventArgs^>(this, &BaseApp::OnWindowClosed);
+
+ window->PointerPressed += ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &BaseApp::PointerPressed);
+ window->PointerWheelChanged += ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &BaseApp::PointerWheelChanged);
+ window->KeyDown += ref new TypedEventHandler<CoreWindow ^, KeyEventArgs ^>(this, &BaseApp::OnKeyDown);
+ window->KeyUp += ref new TypedEventHandler<CoreWindow ^, KeyEventArgs ^>(this, &BaseApp::OnKeyUp);
+
+ Windows::Devices::Input::MouseDevice::GetForCurrentView()->MouseMoved += ref new TypedEventHandler<MouseDevice^, MouseEventArgs^>(this, &BaseApp::MouseMoved);
+
+ DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
+ currentDisplayInformation->DpiChanged += ref new TypedEventHandler<DisplayInformation^, Object^>(this, &BaseApp::OnDpiChanged);
+ currentDisplayInformation->OrientationChanged += ref new TypedEventHandler<DisplayInformation^, Object^>(this, &BaseApp::OnOrientationChanged);
+
+ // The CoreWindow has been created, so EGL can be initialized.
+
+ uwpWindow = (EGLNativeWindowType)window;
+
+ InitWindow(width, height, NULL);
+ }
+
+ virtual void Load(Platform::String^ entryPoint) {}
+
+ void Setup(int width, int height)
+ {
+ //Set dimensions
+ this->width = width;
+ this->height = height;
+ }
+
+ virtual void Run()
+ {
+ //Get display dimensions
+ DisplayInformation^ dInfo = DisplayInformation::GetForCurrentView();
+ Vector2 screenSize = { dInfo->ScreenWidthInRawPixels, dInfo->ScreenHeightInRawPixels };
+
+ //Send display dimensions
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = SetDisplayDims;
+ msg->Vector0 = screenSize;
+ UWPSendMessage(msg);
+
+ //Send the time to the core
+ using clock = std::chrono::high_resolution_clock;
+ auto timeStart = clock::now();
+
+ //Set fps if 0
+ if (GetFPS() <= 0)
+ SetTargetFPS(60);
+
+ while (!mWindowClosed)
+ {
+ if (mWindowVisible)
+ {
+ //Send time
+ auto delta = clock::now() - timeStart;
+
+ UWPMessage* timeMsg = CreateUWPMessage();
+ timeMsg->Type = SetGameTime;
+ timeMsg->Double0 = std::chrono::duration_cast<std::chrono::seconds>(delta).count();
+ UWPSendMessage(timeMsg);
+
+ //Call update function
+ Update();
+
+ PollInput();
+
+ CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent);
+ }
+ else
+ {
+ CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending);
+ }
+ }
+
+ CloseWindow();
+ }
+
+ //Called every frame (Maybe add draw)
+ virtual void Update() {}
+
+ virtual void Uninitialize() {}
+
+protected:
+
+ // Input polling
+ void PollInput()
+ {
+ // Process Messages
+ {
+ //Loop over pending messages
+ while (UWPHasMessages())
+ {
+ //Get the message
+ auto msg = UWPGetMessage();
+
+ //Carry out the command
+ switch(msg->Type)
+ {
+ case ShowMouse: //Do the same thing because of how UWP works...
+ case UnlockMouse:
+ {
+ CoreWindow::GetForCurrentThread()->PointerCursor = regularCursor;
+ cursorLocked = false;
+ MoveMouse(GetMousePosition());
+ break;
+ }
+ case HideMouse: //Do the same thing because of how UWP works...
+ case LockMouse:
+ {
+ CoreWindow::GetForCurrentThread()->PointerCursor = nullptr;
+ cursorLocked = true;
+ break;
+ }
+ case SetMouseLocation:
+ {
+ MoveMouse(msg->Vector0);
+ break;
+ }
+ }
+
+ //Delete the message
+ DeleteUWPMessage(msg);
+ }
+ }
+
+ // Process Keyboard
+ {
+ for (int k = 0x08; k < 0xA6; k++) {
+ auto state = CoreWindow::GetForCurrentThread()->GetKeyState((Windows::System::VirtualKey) k);
+
+#ifdef HOLDHACK
+ //Super hacky way of waiting three frames to see if we are ready to register the key as deregistered
+ //This will wait an entire 4 frames before deregistering the key, this makes sure that the key is not flickering
+ if (KeyboardStateHack[k] == 2)
+ {
+ if ((state & CoreVirtualKeyStates::None) == CoreVirtualKeyStates::None)
+ {
+ KeyboardStateHack[k] = 3;
+ }
+ }
+ else if (KeyboardStateHack[k] == 3)
+ {
+ if ((state & CoreVirtualKeyStates::None) == CoreVirtualKeyStates::None)
+ {
+ KeyboardStateHack[k] = 4;
+ }
+ }
+ else if (KeyboardStateHack[k] == 4)
+ {
+ if ((state & CoreVirtualKeyStates::None) == CoreVirtualKeyStates::None)
+ {
+ //Reset key...
+ KeyboardStateHack[k] = 0;
+
+ //Tell core
+ RegisterKey(k, 0);
+ }
+ }
+#endif
+ //Left and right alt, KeyUp and KeyDown are not called for it
+ //No need to hack because this is not a character
+
+ //TODO: Maybe do all other key registrations like this, no more key events?
+
+ if (k == 0xA4 || k == 0xA5)
+ {
+ if ((state & CoreVirtualKeyStates::Down) == CoreVirtualKeyStates::Down)
+ {
+ RegisterKey(k, 1);
+ }
+ else
+ {
+ RegisterKey(k, 0);
+ }
+ }
+ }
+ }
+
+ // Process Mouse
+ {
+
+ if (CurrentPointerID > -1) {
+ auto point = PointerPoint::GetCurrentPoint(CurrentPointerID);
+ auto props = point->Properties;
+
+ if (props->IsLeftButtonPressed)
+ {
+ RegisterClick(MOUSE_LEFT_BUTTON, 1);
+ }
+ else
+ {
+ RegisterClick(MOUSE_LEFT_BUTTON, 0);
+ }
+
+ if (props->IsRightButtonPressed)
+ {
+ RegisterClick(MOUSE_RIGHT_BUTTON, 1);
+ }
+ else
+ {
+ RegisterClick(MOUSE_RIGHT_BUTTON, 0);
+ }
+
+ if (props->IsMiddleButtonPressed)
+ {
+ RegisterClick(MOUSE_MIDDLE_BUTTON, 1);
+ }
+ else
+ {
+ RegisterClick(MOUSE_MIDDLE_BUTTON, 0);
+ }
+ }
+
+ CoreWindow ^window = CoreWindow::GetForCurrentThread();
+
+ if (cursorLocked)
+ {
+ // Track cursor movement delta, recenter it on the client
+ auto curMousePos = GetMousePosition();
+
+ auto x = curMousePos.x + mouseDelta.x;
+ auto y = curMousePos.y + mouseDelta.y;
+
+ UpdateMousePosition({ x, y });
+
+ // Why we're not using UWPSetMousePosition here...
+ // UWPSetMousePosition changes the "mousePosition" variable to match where the cursor actually is.
+ // Our cursor is locked to the middle of screen, and we don't want that reflected in "mousePosition"
+ Vector2 centerClient = { (float)(GetScreenWidth() / 2), (float)(GetScreenHeight() / 2) };
+ window->PointerPosition = Point(centerClient.x + window->Bounds.X, centerClient.y + window->Bounds.Y);
+ }
+ else
+ {
+ // Record the cursor's position relative to the client
+ auto x = window->PointerPosition.X - window->Bounds.X;
+ auto y = window->PointerPosition.Y - window->Bounds.Y;
+
+ UpdateMousePosition({ x, y });
+ }
+
+ mouseDelta = { 0 ,0 };
+ }
+
+ // Process Gamepads
+ {
+ // Check if gamepads are ready
+ for (int i = 0; i < MAX_GAMEPADS; i++)
+ {
+ // HACK: UWP keeps a contiguous list of gamepads. For the interest of time I'm just doing a 1:1 mapping of
+ // connected gamepads with their spot in the list, but this has serious robustness problems
+ // e.g. player 1, 2, and 3 are playing a game - if player2 disconnects, p3's controller would now be mapped to p2's character since p3 is now second in the list.
+
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = MarkGamepadActive;
+ msg->Int0 = i;
+ msg->Bool0 = i < Gamepad::Gamepads->Size;
+ UWPSendMessage(msg);
+ }
+
+ // Get current gamepad state
+ for (int i = 0; i < MAX_GAMEPADS; i++)
+ {
+ if (IsGamepadAvailable(i))
+ {
+ // Get current gamepad state
+ auto gamepad = Gamepad::Gamepads->GetAt(i);
+ GamepadReading reading = gamepad->GetCurrentReading();
+
+ // NOTE: Maybe it would be wiser to redefine the gamepad button mappings in "raylib.h" for the UWP platform instead of remapping them manually
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_A, ((reading.Buttons & GamepadButtons::A) == GamepadButtons::A));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_B, ((reading.Buttons & GamepadButtons::B) == GamepadButtons::B));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_X, ((reading.Buttons & GamepadButtons::X) == GamepadButtons::X));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_Y, ((reading.Buttons & GamepadButtons::Y) == GamepadButtons::Y));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_LB, ((reading.Buttons & GamepadButtons::LeftShoulder) == GamepadButtons::LeftShoulder));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_RB, ((reading.Buttons & GamepadButtons::RightShoulder) == GamepadButtons::RightShoulder));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_SELECT, ((reading.Buttons & GamepadButtons::View) == GamepadButtons::View)); // Changed for XB1 Controller
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_START, ((reading.Buttons & GamepadButtons::Menu) == GamepadButtons::Menu)); // Changed for XB1 Controller
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_UP, ((reading.Buttons & GamepadButtons::DPadUp) == GamepadButtons::DPadUp));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_RIGHT, ((reading.Buttons & GamepadButtons::DPadRight) == GamepadButtons::DPadRight));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_DOWN, ((reading.Buttons & GamepadButtons::DPadDown) == GamepadButtons::DPadDown));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_LEFT, ((reading.Buttons & GamepadButtons::DPadLeft) == GamepadButtons::DPadLeft));
+ RegisterGamepadButton(i, GAMEPAD_XBOX_BUTTON_HOME, false); // Home button not supported by UWP
+
+ // Get current axis state
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_LEFT_X, (float)reading.LeftThumbstickX);
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_LEFT_Y, (float)reading.LeftThumbstickY);
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_RIGHT_X, (float)reading.RightThumbstickX);
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_RIGHT_Y, (float)reading.RightThumbstickY);
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_LT, (float)reading.LeftTrigger);
+ RegisterGamepadAxis(i, GAMEPAD_XBOX_AXIS_RT, (float)reading.RightTrigger);
+ }
+ }
+ }
+ }
+
+ // Application lifecycle event handlers.
+ void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args)
+ {
+ // Run() won't start until the CoreWindow is activated.
+ CoreWindow::GetForCurrentThread()->Activate();
+ }
+
+ void OnResuming(Platform::Object^ sender, Platform::Object^ args) {}
+
+ // Window event handlers.
+ void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = HandleResize;
+ UWPSendMessage(msg);
+ }
+
+ void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args)
+ {
+ mWindowVisible = args->Visible;
+ }
+
+ void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args)
+ {
+ mWindowClosed = true;
+ }
+
+ // DisplayInformation event handlers.
+ void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args) {}
+ void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args) {}
+
+ // Input event handlers
+ void PointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args)
+ {
+ //Get the current active pointer ID for our loop
+ CurrentPointerID = args->CurrentPoint->PointerId;
+ args->Handled = true;
+ }
+
+ void PointerWheelChanged(Windows::UI::Core::CoreWindow ^sender, Windows::UI::Core::PointerEventArgs^ args)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = ScrollWheelUpdate;
+ msg->Float0 = args->CurrentPoint->Properties->MouseWheelDelta;
+ UWPSendMessage(msg);
+ }
+
+ void MouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args)
+ {
+ mouseDelta.x += args->MouseDelta.X;
+ mouseDelta.y += args->MouseDelta.Y;
+ }
+
+ void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
+ {
+#ifdef HOLDHACK
+ //Start the hack
+ KeyboardStateHack[(int)args->VirtualKey] = 1;
+#endif
+
+ RegisterKey((int)args->VirtualKey, 1);
+ }
+
+ void OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
+ {
+#ifdef HOLDHACK
+ //The same hack
+ if (KeyboardStateHack[(int)args->VirtualKey] == 1)
+ {
+ KeyboardStateHack[(int)args->VirtualKey] = 2;
+ }
+ else if (KeyboardStateHack[(int)args->VirtualKey] == 2)
+ {
+ KeyboardStateHack[(int)args->VirtualKey] = 3;
+ }
+ else if (KeyboardStateHack[(int)args->VirtualKey] == 3)
+ {
+ KeyboardStateHack[(int)args->VirtualKey] = 4;
+ }
+ else if (KeyboardStateHack[(int)args->VirtualKey] == 4)
+ {
+ RegisterKey((int)args->VirtualKey, 0);
+ KeyboardStateHack[(int)args->VirtualKey] = 0;
+ }
+#else
+ //No hack, allow flickers
+ RegisterKey((int)args->VirtualKey, 0);
+#endif
+ }
+
+private:
+
+ void RegisterKey(int key, char status)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = UWPMessageType::RegisterKey;
+ msg->Int0 = key;
+ msg->Char0 = status;
+ UWPSendMessage(msg);
+ }
+
+ void MoveMouse(Vector2 pos)
+ {
+ CoreWindow ^window = CoreWindow::GetForCurrentThread();
+ Point mousePosScreen = Point(pos.x + window->Bounds.X, pos.y + window->Bounds.Y);
+ window->PointerPosition = mousePosScreen;
+ }
+
+ void RegisterGamepadButton(int gamepad, int button, char status)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = MarkGamepadButton;
+ msg->Int0 = gamepad;
+ msg->Int1 = button;
+ msg->Char0 = status;
+ UWPSendMessage(msg);
+ }
+
+ void RegisterGamepadAxis(int gamepad, int axis, float value)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = MarkGamepadAxis;
+ msg->Int0 = gamepad;
+ msg->Int1 = axis;
+ msg->Float0 = value;
+ UWPSendMessage(msg);
+ }
+
+ void UpdateMousePosition(Vector2 pos)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = UpdateMouseLocation;
+ msg->Vector0 = pos;
+ UWPSendMessage(msg);
+ }
+
+ void RegisterClick(int button, char status)
+ {
+ UWPMessage* msg = CreateUWPMessage();
+ msg->Type = UWPMessageType::RegisterClick;
+ msg->Int0 = button;
+ msg->Char0 = status;
+ UWPSendMessage(msg);
+ }
+
+ bool mWindowClosed = false;
+ bool mWindowVisible = true;
+
+ int width = 640;
+ int height = 480;
+
+ int CurrentPointerID = -1;
+
+#ifdef HOLDHACK
+ char KeyboardStateHack[0xA6]; //0xA6 because the highest key we compare against is 0xA5
+#endif
+};
+
+//Application source for creating the program
+template<typename AppType>
+ref class ApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
+{
+public:
+ virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView()
+ {
+ return ref new AppType();
+ }
+}; \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/Package.appxmanifest b/projects/VS2017.UWP/raylib.App.UWP/Package.appxmanifest
new file mode 100644
index 00000000..56020a50
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/Package.appxmanifest
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
+ <Identity Name="b842558c-c034-4e4b-9457-a286f26e83cc" Publisher="CN=Alumno" Version="1.0.0.0" />
+ <mp:PhoneIdentity PhoneProductId="56d2ca94-c361-4e9f-9a33-bacd751552fa" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
+ <Properties>
+ <DisplayName>raylibUWP</DisplayName>
+ <PublisherDisplayName>raysan5</PublisherDisplayName>
+ <Logo>Assets\StoreLogo.png</Logo>
+ </Properties>
+ <Dependencies>
+ <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
+ </Dependencies>
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+ <Applications>
+ <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="raylibUWP.App">
+ <uap:VisualElements DisplayName="raylibUWP" Square150x150Logo="Assets\Logo.png" Square44x44Logo="Assets\SmallLogo.png" Description="raylib UWP game" BackgroundColor="#464646">
+ <uap:SplashScreen Image="Assets\SplashScreen.png" />
+ </uap:VisualElements>
+ </Application>
+ </Applications>
+ <Capabilities>
+ <Capability Name="internetClient" />
+ </Capabilities>
+</Package> \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/packages.config b/projects/VS2017.UWP/raylib.App.UWP/packages.config
new file mode 100644
index 00000000..70c3dea0
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="ANGLE.WindowsStore" version="2.1.13" targetFramework="native" />
+</packages> \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/pch.cpp b/projects/VS2017.UWP/raylib.App.UWP/pch.cpp
new file mode 100644
index 00000000..bcb5590b
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/pch.cpp
@@ -0,0 +1 @@
+#include "pch.h"
diff --git a/projects/VS2017.UWP/raylib.App.UWP/pch.h b/projects/VS2017.UWP/raylib.App.UWP/pch.h
new file mode 100644
index 00000000..dcbd2378
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/pch.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <memory>
+#include <wrl.h>
+
+// OpenGL ES includes
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+
+// EGL includes
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <EGL/eglplatform.h>
+
+// ANGLE include for Windows Store
+#include <angle_windowsstore.h> \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.TemporaryKey.pfx b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.TemporaryKey.pfx
new file mode 100644
index 00000000..0ada3be0
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.TemporaryKey.pfx
Binary files differ
diff --git a/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.filters b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.filters
new file mode 100644
index 00000000..4e83c979
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.filters
@@ -0,0 +1,42 @@
+<?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="pch.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="Assets\SmallLogo.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\SplashScreen.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\WideLogo.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\Logo.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="UWP_OpenGLES2_TemporaryKey.pfx" />
+ <None Include="packages.config" />
+ <None Include="$(angle-BinPath)\libEGL.dll" />
+ <None Include="$(angle-BinPath)\libGLESv2.dll" />
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="Assets">
+ <UniqueIdentifier>{d16954bb-de54-472b-ac10-ecab10d3fdc8}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj
new file mode 100644
index 00000000..421d7209
--- /dev/null
+++ b/projects/VS2017.UWP/raylib.App.UWP/raylib.App.UWP.vcxproj
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{b842558c-c034-4e4b-9457-a286f26e83cc}</ProjectGuid>
+ <RootNamespace>raylibUWP</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
+ <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
+ <ProjectName>raylib.App.UWP</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <PackageCertificateKeyFile>raylib.App.UWP.TemporaryKey.pfx</PackageCertificateKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <IncludePath>$(IncludePath)</IncludePath>
+ <LibraryPath>$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='ARM'">
+ <Link>
+ <AdditionalDependencies>mincore.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store\arm;$(VCInstallDir)\lib\arm;$(SolutionDir)\raylib\Debug</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+ <Link>
+ <AdditionalDependencies>mincore.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>$(SolutionDir)raylib\Debug;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+ <Link>
+ <AdditionalDependencies>mincore.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>C:\Users\Sam\Documents\GitHub\raylib\project\vs2015.UWP\x64\Debug;C:\Users\Alumno\Downloads\angle\UWP_OpenGLES2\raylib;%(AdditionalLibraryDirectories);$(VCInstallDir)\lib\store\amd64;$(VCInstallDir)\lib\amd64</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
+ <ClCompile>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+ <PreprocessorDefinitions>PLATFORM_UWP;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ProjectReference>
+ <LinkLibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkLibraryDependencies>
+ </ProjectReference>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
+ <ClCompile>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\src;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
+ <PreprocessorDefinitions>PLATFORM_UWP;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Default</CompileAs>
+ <OmitDefaultLibName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</OmitDefaultLibName>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Image Include="Assets\Logo.scale-100.png" />
+ <Image Include="Assets\SmallLogo.scale-100.png" />
+ <Image Include="Assets\StoreLogo.scale-100.png" />
+ <Image Include="Assets\SplashScreen.scale-100.png" />
+ <Image Include="Assets\WideLogo.scale-100.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="App.h" />
+ <ClInclude Include="BaseApp.h" />
+ <ClInclude Include="pch.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="App.cpp" />
+ <ClCompile Include="pch.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <None Include="packages.config" />
+ <None Include="raylib.App.UWP.TemporaryKey.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\raylib.UWP\raylib.UWP.vcxproj">
+ <Project>{ea91e088-7c71-4f32-b761-e054305cd519}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ <Import Project="..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets" Condition="Exists('..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" />
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ANGLE.WindowsStore.2.1.13\build\native\ANGLE.WindowsStore.targets'))" />
+ </Target>
+</Project> \ No newline at end of file