Review UWP implementation
Basically, formating review and some variables naming to follow raylib conventions.
This commit is contained in:
parent
2de1f31821
commit
e8c413b7cd
7 changed files with 299 additions and 385 deletions
|
@ -17,7 +17,7 @@ int main(Platform::Array<Platform::String^>^)
|
||||||
|
|
||||||
App::App()
|
App::App()
|
||||||
{
|
{
|
||||||
//This does not work... need to fix this.
|
// This does not work... need to fix this.
|
||||||
SetConfigFlags(0);
|
SetConfigFlags(0);
|
||||||
|
|
||||||
Setup(640, 480);
|
Setup(640, 480);
|
||||||
|
@ -30,49 +30,50 @@ static int gTime = 0;
|
||||||
// This method is called every frame
|
// This method is called every frame
|
||||||
void App::Update()
|
void App::Update()
|
||||||
{
|
{
|
||||||
//return;
|
// Update
|
||||||
// Draw
|
//----------------------------------------------------------------------------------
|
||||||
|
posX += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_X) * 5;
|
||||||
|
posY += GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_XBOX_AXIS_LEFT_Y) * -5;
|
||||||
|
|
||||||
|
auto mPos = GetMousePosition();
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_A))
|
||||||
|
{
|
||||||
|
posX -= 50;
|
||||||
|
EnableCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsKeyPressed(KEY_D))
|
||||||
|
{
|
||||||
|
posX += 50;
|
||||||
|
DisableCursor();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int pos = 0;
|
||||||
|
pos -= GetMouseWheelMove();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Draw
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
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);
|
DrawRectangle(posX, posY, 400, 100, RED);
|
||||||
|
|
||||||
DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE);
|
DrawLine(0, 0, GetScreenWidth(), GetScreenHeight(), BLUE);
|
||||||
|
|
||||||
auto mPos = GetMousePosition();
|
|
||||||
|
|
||||||
DrawCircle(mPos.x, mPos.y, 40, BLUE);
|
DrawCircle(mPos.x, mPos.y, 40, BLUE);
|
||||||
|
|
||||||
if (IsKeyDown(KEY_S)) DrawCircle(100, 100, 100, BLUE);
|
if (IsKeyDown(KEY_S)) DrawCircle(100, 100, 100, BLUE);
|
||||||
|
|
||||||
if (IsKeyPressed(KEY_A))
|
if (IsKeyDown(KEY_LEFT_ALT)) DrawRectangle(250, 250, 20, 20, BLACK);
|
||||||
{
|
if (IsKeyDown(KEY_BACKSPACE)) DrawRectangle(280, 250, 20, 20, BLACK);
|
||||||
posX -= 50;
|
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) DrawRectangle(280, 250, 20, 20, BLACK);
|
||||||
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(280, pos + 50, 20, 20, BLACK);
|
||||||
DrawRectangle(250, 280 + (gTime++ % 60), 10, 10, PURPLE);
|
DrawRectangle(250, 280 + (gTime++ % 60), 10, 10, PURPLE);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
}
|
}
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
//Define what header we use for BaseApp.h
|
// Define what header we use for BaseApp.h
|
||||||
#define PCH "pch.h"
|
#define PCH "pch.h"
|
||||||
|
|
||||||
//Enable hold hack
|
// Enable hold hack
|
||||||
#define HOLDHACK
|
#define HOLDHACK
|
||||||
|
|
||||||
#include "BaseApp.h"
|
#include "BaseApp.h"
|
||||||
|
|
|
@ -126,44 +126,43 @@ public:
|
||||||
|
|
||||||
void Setup(int width, int height)
|
void Setup(int width, int height)
|
||||||
{
|
{
|
||||||
//Set dimensions
|
// Set dimensions
|
||||||
this->width = width;
|
this->width = width;
|
||||||
this->height = height;
|
this->height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Run()
|
virtual void Run()
|
||||||
{
|
{
|
||||||
//Get display dimensions
|
// Get display dimensions
|
||||||
DisplayInformation^ dInfo = DisplayInformation::GetForCurrentView();
|
DisplayInformation^ dInfo = DisplayInformation::GetForCurrentView();
|
||||||
Vector2 screenSize = { dInfo->ScreenWidthInRawPixels, dInfo->ScreenHeightInRawPixels };
|
Vector2 screenSize = { dInfo->ScreenWidthInRawPixels, dInfo->ScreenHeightInRawPixels };
|
||||||
|
|
||||||
//Send display dimensions
|
// Send display dimensions
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = SetDisplayDims;
|
msg->type = UWP_MSG_SET_DISPLAY_DIMS;
|
||||||
msg->Vector0 = screenSize;
|
msg->paramVector0 = screenSize;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
|
|
||||||
//Send the time to the core
|
// Send the time to the core
|
||||||
using clock = std::chrono::high_resolution_clock;
|
using clock = std::chrono::high_resolution_clock;
|
||||||
auto timeStart = clock::now();
|
auto timeStart = clock::now();
|
||||||
|
|
||||||
//Set fps if 0
|
// Set fps if 0
|
||||||
if (GetFPS() <= 0)
|
if (GetFPS() <= 0) SetTargetFPS(60);
|
||||||
SetTargetFPS(60);
|
|
||||||
|
|
||||||
while (!mWindowClosed)
|
while (!mWindowClosed)
|
||||||
{
|
{
|
||||||
if (mWindowVisible)
|
if (mWindowVisible)
|
||||||
{
|
{
|
||||||
//Send time
|
// Send time
|
||||||
auto delta = clock::now() - timeStart;
|
auto delta = clock::now() - timeStart;
|
||||||
|
|
||||||
UWPMessage* timeMsg = CreateUWPMessage();
|
UWPMessage *timeMsg = CreateUWPMessage();
|
||||||
timeMsg->Type = SetGameTime;
|
timeMsg->type = UWP_MSG_SET_GAME_TIME;
|
||||||
timeMsg->Double0 = std::chrono::duration_cast<std::chrono::seconds>(delta).count();
|
timeMsg->paramDouble0 = std::chrono::duration_cast<std::chrono::seconds>(delta).count();
|
||||||
UWPSendMessage(timeMsg);
|
UWPSendMessage(timeMsg);
|
||||||
|
|
||||||
//Call update function
|
// Call update function
|
||||||
Update();
|
Update();
|
||||||
|
|
||||||
PollInput();
|
PollInput();
|
||||||
|
@ -191,38 +190,38 @@ protected:
|
||||||
{
|
{
|
||||||
// Process Messages
|
// Process Messages
|
||||||
{
|
{
|
||||||
//Loop over pending messages
|
// Loop over pending messages
|
||||||
while (UWPHasMessages())
|
while (UWPHasMessages())
|
||||||
{
|
{
|
||||||
//Get the message
|
// Get the message
|
||||||
auto msg = UWPGetMessage();
|
auto msg = UWPGetMessage();
|
||||||
|
|
||||||
//Carry out the command
|
// Carry out the command
|
||||||
switch(msg->Type)
|
switch(msg->type)
|
||||||
{
|
{
|
||||||
case ShowMouse: //Do the same thing because of how UWP works...
|
case UWP_MSG_SHOW_MOUSE: // Do the same thing because of how UWP works...
|
||||||
case UnlockMouse:
|
case UWP_MSG_UNLOCK_MOUSE:
|
||||||
{
|
{
|
||||||
CoreWindow::GetForCurrentThread()->PointerCursor = regularCursor;
|
CoreWindow::GetForCurrentThread()->PointerCursor = regularCursor;
|
||||||
cursorLocked = false;
|
cursorLocked = false;
|
||||||
MoveMouse(GetMousePosition());
|
MoveMouse(GetMousePosition());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HideMouse: //Do the same thing because of how UWP works...
|
case UWP_MSG_HIDE_MOUSE: // Do the same thing because of how UWP works...
|
||||||
case LockMouse:
|
case UWP_MSG_LOCK_MOUSE:
|
||||||
{
|
{
|
||||||
CoreWindow::GetForCurrentThread()->PointerCursor = nullptr;
|
CoreWindow::GetForCurrentThread()->PointerCursor = nullptr;
|
||||||
cursorLocked = true;
|
cursorLocked = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SetMouseLocation:
|
case UWP_MSG_SET_MOUSE_LOCATION:
|
||||||
{
|
{
|
||||||
MoveMouse(msg->Vector0);
|
MoveMouse(msg->paramVector0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Delete the message
|
// Delete the message
|
||||||
DeleteUWPMessage(msg);
|
DeleteUWPMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,8 +232,8 @@ protected:
|
||||||
auto state = CoreWindow::GetForCurrentThread()->GetKeyState((Windows::System::VirtualKey) k);
|
auto state = CoreWindow::GetForCurrentThread()->GetKeyState((Windows::System::VirtualKey) k);
|
||||||
|
|
||||||
#ifdef HOLDHACK
|
#ifdef HOLDHACK
|
||||||
//Super hacky way of waiting three frames to see if we are ready to register the key as deregistered
|
// 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
|
// 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 (KeyboardStateHack[k] == 2)
|
||||||
{
|
{
|
||||||
if ((state & CoreVirtualKeyStates::None) == CoreVirtualKeyStates::None)
|
if ((state & CoreVirtualKeyStates::None) == CoreVirtualKeyStates::None)
|
||||||
|
@ -261,10 +260,10 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//Left and right alt, KeyUp and KeyDown are not called for it
|
// Left and right alt, KeyUp and KeyDown are not called for it
|
||||||
//No need to hack because this is not a character
|
// No need to hack because this is not a character
|
||||||
|
|
||||||
//TODO: Maybe do all other key registrations like this, no more key events?
|
// TODO: Maybe do all other key registrations like this, no more key events?
|
||||||
|
|
||||||
if (k == 0xA4 || k == 0xA5)
|
if (k == 0xA4 || k == 0xA5)
|
||||||
{
|
{
|
||||||
|
@ -283,7 +282,8 @@ protected:
|
||||||
// Process Mouse
|
// Process Mouse
|
||||||
{
|
{
|
||||||
|
|
||||||
if (CurrentPointerID > -1) {
|
if (CurrentPointerID > -1)
|
||||||
|
{
|
||||||
auto point = PointerPoint::GetCurrentPoint(CurrentPointerID);
|
auto point = PointerPoint::GetCurrentPoint(CurrentPointerID);
|
||||||
auto props = point->Properties;
|
auto props = point->Properties;
|
||||||
|
|
||||||
|
@ -355,9 +355,9 @@ protected:
|
||||||
// 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.
|
// 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();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = MarkGamepadActive;
|
msg->type = UWP_MSG_SET_GAMEPAD_ACTIVE;
|
||||||
msg->Int0 = i;
|
msg->paramInt0 = i;
|
||||||
msg->Bool0 = i < Gamepad::Gamepads->Size;
|
msg->paramBool0 = i < Gamepad::Gamepads->Size;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ protected:
|
||||||
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args)
|
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = HandleResize;
|
msg->type = UWP_MSG_HANDLE_RESIZE;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,8 +439,8 @@ protected:
|
||||||
void PointerWheelChanged(Windows::UI::Core::CoreWindow ^sender, Windows::UI::Core::PointerEventArgs^ args)
|
void PointerWheelChanged(Windows::UI::Core::CoreWindow ^sender, Windows::UI::Core::PointerEventArgs^ args)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = ScrollWheelUpdate;
|
msg->type = UWP_MSG_SCROLL_WHEEL_UPDATE;
|
||||||
msg->Float0 = args->CurrentPoint->Properties->MouseWheelDelta;
|
msg->paramFloat0 = args->CurrentPoint->Properties->MouseWheelDelta;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ protected:
|
||||||
void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
|
void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
|
||||||
{
|
{
|
||||||
#ifdef HOLDHACK
|
#ifdef HOLDHACK
|
||||||
//Start the hack
|
// Start the hack
|
||||||
KeyboardStateHack[(int)args->VirtualKey] = 1;
|
KeyboardStateHack[(int)args->VirtualKey] = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ protected:
|
||||||
void OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
|
void OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args)
|
||||||
{
|
{
|
||||||
#ifdef HOLDHACK
|
#ifdef HOLDHACK
|
||||||
//The same hack
|
// The same hack
|
||||||
if (KeyboardStateHack[(int)args->VirtualKey] == 1)
|
if (KeyboardStateHack[(int)args->VirtualKey] == 1)
|
||||||
{
|
{
|
||||||
KeyboardStateHack[(int)args->VirtualKey] = 2;
|
KeyboardStateHack[(int)args->VirtualKey] = 2;
|
||||||
|
@ -482,7 +482,7 @@ protected:
|
||||||
KeyboardStateHack[(int)args->VirtualKey] = 0;
|
KeyboardStateHack[(int)args->VirtualKey] = 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
//No hack, allow flickers
|
// No hack, allow flickers
|
||||||
RegisterKey((int)args->VirtualKey, 0);
|
RegisterKey((int)args->VirtualKey, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -492,9 +492,9 @@ private:
|
||||||
void RegisterKey(int key, char status)
|
void RegisterKey(int key, char status)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = UWPMessageType::RegisterKey;
|
msg->type = UWPMessageType::UWP_MSG_REGISTER_KEY;
|
||||||
msg->Int0 = key;
|
msg->paramInt0 = key;
|
||||||
msg->Char0 = status;
|
msg->paramChar0 = status;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,37 +508,37 @@ private:
|
||||||
void RegisterGamepadButton(int gamepad, int button, char status)
|
void RegisterGamepadButton(int gamepad, int button, char status)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = MarkGamepadButton;
|
msg->type = UWP_MSG_SET_GAMEPAD_BUTTON;
|
||||||
msg->Int0 = gamepad;
|
msg->paramInt0 = gamepad;
|
||||||
msg->Int1 = button;
|
msg->paramInt1 = button;
|
||||||
msg->Char0 = status;
|
msg->paramChar0 = status;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterGamepadAxis(int gamepad, int axis, float value)
|
void RegisterGamepadAxis(int gamepad, int axis, float value)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = MarkGamepadAxis;
|
msg->type = UWP_MSG_SET_GAMEPAD_AXIS;
|
||||||
msg->Int0 = gamepad;
|
msg->paramInt0 = gamepad;
|
||||||
msg->Int1 = axis;
|
msg->paramInt1 = axis;
|
||||||
msg->Float0 = value;
|
msg->paramFloat0 = value;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateMousePosition(Vector2 pos)
|
void UpdateMousePosition(Vector2 pos)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = UpdateMouseLocation;
|
msg->type = UWP_MSG_UPDATE_MOUSE_LOCATION;
|
||||||
msg->Vector0 = pos;
|
msg->paramVector0 = pos;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterClick(int button, char status)
|
void RegisterClick(int button, char status)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = UWPMessageType::RegisterClick;
|
msg->type = UWPMessageType::UWP_MSG_REGISTER_CLICK;
|
||||||
msg->Int0 = button;
|
msg->paramInt0 = button;
|
||||||
msg->Char0 = status;
|
msg->paramChar0 = status;
|
||||||
UWPSendMessage(msg);
|
UWPSendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,11 +551,11 @@ private:
|
||||||
int CurrentPointerID = -1;
|
int CurrentPointerID = -1;
|
||||||
|
|
||||||
#ifdef HOLDHACK
|
#ifdef HOLDHACK
|
||||||
char KeyboardStateHack[0xA6]; //0xA6 because the highest key we compare against is 0xA5
|
char KeyboardStateHack[0xA6]; // 0xA6 because the highest key we compare against is 0xA5
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
//Application source for creating the program
|
// Application source for creating the program
|
||||||
template<typename AppType>
|
template<typename AppType>
|
||||||
ref class ApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
ref class ApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
|
||||||
{
|
{
|
||||||
|
|
321
src/core.c
321
src/core.c
|
@ -391,7 +391,6 @@ static int gamepadStream[MAX_GAMEPADS] = { -1 };// Gamepad device file descripto
|
||||||
static pthread_t gamepadThreadId; // Gamepad reading thread id
|
static pthread_t gamepadThreadId; // Gamepad reading thread id
|
||||||
static char gamepadName[64]; // Gamepad name holder
|
static char gamepadName[64]; // Gamepad name holder
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Timming system variables
|
// Timming system variables
|
||||||
|
@ -402,7 +401,6 @@ static double updateTime = 0.0; // Time measure for frame update
|
||||||
static double drawTime = 0.0; // Time measure for frame draw
|
static double drawTime = 0.0; // Time measure for frame draw
|
||||||
static double frameTime = 0.0; // Time measure for one frame
|
static double frameTime = 0.0; // Time measure for one frame
|
||||||
static double targetTime = 0.0; // Desired time for one frame, if 0 not applied
|
static double targetTime = 0.0; // Desired time for one frame, if 0 not applied
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Config internal variables
|
// Config internal variables
|
||||||
|
@ -1027,8 +1025,8 @@ void ShowCursor(void)
|
||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = ShowMouse;
|
msg->type = UWP_MSG_SHOW_MOUSE;
|
||||||
SendMessageToUWP(msg);
|
SendMessageToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
cursorHidden = false;
|
cursorHidden = false;
|
||||||
|
@ -1041,8 +1039,8 @@ void HideCursor(void)
|
||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = HideMouse;
|
msg->type = UWP_MSG_HIDE_MOUSE;
|
||||||
SendMessageToUWP(msg);
|
SendMessageToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
cursorHidden = true;
|
cursorHidden = true;
|
||||||
|
@ -1064,8 +1062,8 @@ void EnableCursor(void)
|
||||||
toggleCursorLock = true;
|
toggleCursorLock = true;
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = LockMouse;
|
msg->type = UWP_MSG_LOCK_MOUSE;
|
||||||
SendMessageToUWP(msg);
|
SendMessageToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
cursorHidden = false;
|
cursorHidden = false;
|
||||||
|
@ -1081,8 +1079,8 @@ void DisableCursor(void)
|
||||||
toggleCursorLock = true;
|
toggleCursorLock = true;
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = UnlockMouse;
|
msg->type = UWP_MSG_UNLOCK_MOUSE;
|
||||||
SendMessageToUWP(msg);
|
SendMessageToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
cursorHidden = true;
|
cursorHidden = true;
|
||||||
|
@ -1165,7 +1163,7 @@ void EndDrawing(void)
|
||||||
frameTime += extraTime;
|
frameTime += extraTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize 2D mode with custom camera (2D)
|
// Initialize 2D mode with custom camera (2D)
|
||||||
|
@ -1444,8 +1442,8 @@ double GetTime(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
//Updated through messages
|
// Updated through messages
|
||||||
return currentTime;
|
return currentTime;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2236,10 +2234,10 @@ void SetMousePosition(int x, int y)
|
||||||
glfwSetCursorPos(window, mousePosition.x, mousePosition.y);
|
glfwSetCursorPos(window, mousePosition.x, mousePosition.y);
|
||||||
#endif
|
#endif
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage *msg = CreateUWPMessage();
|
||||||
msg->Type = SetMouseLocation;
|
msg->type = UWP_MSG_SET_MOUSE_LOCATION;
|
||||||
msg->Vector0.x = mousePosition.x;
|
msg->paramVector0.x = mousePosition.x;
|
||||||
msg->Vector0.y = mousePosition.y;
|
msg->paramVector0.y = mousePosition.y;
|
||||||
SendMessageToUWP(msg);
|
SendMessageToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -2711,8 +2709,6 @@ static bool InitGraphicsDevice(int width, int height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetupFramebuffer(displayWidth, displayHeight);
|
|
||||||
|
|
||||||
EGLint numConfigs = 0;
|
EGLint numConfigs = 0;
|
||||||
if ((eglChooseConfig(display, framebufferAttribs, &config, 1, &numConfigs) == EGL_FALSE) || (numConfigs == 0))
|
if ((eglChooseConfig(display, framebufferAttribs, &config, 1, &numConfigs) == EGL_FALSE) || (numConfigs == 0))
|
||||||
{
|
{
|
||||||
|
@ -2769,8 +2765,6 @@ static bool InitGraphicsDevice(int width, int height)
|
||||||
eglQuerySurface(display, surface, EGL_WIDTH, &screenWidth);
|
eglQuerySurface(display, surface, EGL_WIDTH, &screenWidth);
|
||||||
eglQuerySurface(display, surface, EGL_HEIGHT, &screenHeight);
|
eglQuerySurface(display, surface, EGL_HEIGHT, &screenHeight);
|
||||||
|
|
||||||
//SetupFramebuffer(displayWidth, displayHeight); //Borked
|
|
||||||
|
|
||||||
#else // PLATFORM_ANDROID, PLATFORM_RPI
|
#else // PLATFORM_ANDROID, PLATFORM_RPI
|
||||||
EGLint numConfigs;
|
EGLint numConfigs;
|
||||||
|
|
||||||
|
@ -2941,8 +2935,8 @@ static void SetupFramebuffer(int width, int height)
|
||||||
TraceLog(LOG_WARNING, "DOWNSCALING: Required screen size (%ix%i) is bigger than display size (%ix%i)", screenWidth, screenHeight, displayWidth, displayHeight);
|
TraceLog(LOG_WARNING, "DOWNSCALING: Required screen size (%ix%i) is bigger than display size (%ix%i)", screenWidth, screenHeight, displayWidth, displayHeight);
|
||||||
|
|
||||||
// Downscaling to fit display with border-bars
|
// Downscaling to fit display with border-bars
|
||||||
float widthRatio = (float)displayWidth / (float)screenWidth;
|
float widthRatio = (float)displayWidth/(float)screenWidth;
|
||||||
float heightRatio = (float)displayHeight / (float)screenHeight;
|
float heightRatio = (float)displayHeight/(float)screenHeight;
|
||||||
|
|
||||||
if (widthRatio <= heightRatio)
|
if (widthRatio <= heightRatio)
|
||||||
{
|
{
|
||||||
|
@ -2960,7 +2954,7 @@ static void SetupFramebuffer(int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screen scaling required
|
// Screen scaling required
|
||||||
float scaleRatio = (float)renderWidth / (float)screenWidth;
|
float scaleRatio = (float)renderWidth/(float)screenWidth;
|
||||||
screenScaling = MatrixScale(scaleRatio, scaleRatio, scaleRatio);
|
screenScaling = MatrixScale(scaleRatio, scaleRatio, scaleRatio);
|
||||||
|
|
||||||
// NOTE: We render to full display resolution!
|
// NOTE: We render to full display resolution!
|
||||||
|
@ -2976,13 +2970,13 @@ static void SetupFramebuffer(int width, int height)
|
||||||
TraceLog(LOG_INFO, "UPSCALING: Required screen size: %i x %i -> Display size: %i x %i", screenWidth, screenHeight, displayWidth, displayHeight);
|
TraceLog(LOG_INFO, "UPSCALING: Required screen size: %i x %i -> Display size: %i x %i", screenWidth, screenHeight, displayWidth, displayHeight);
|
||||||
|
|
||||||
// Upscaling to fit display with border-bars
|
// Upscaling to fit display with border-bars
|
||||||
float displayRatio = (float)displayWidth / (float)displayHeight;
|
float displayRatio = (float)displayWidth/(float)displayHeight;
|
||||||
float screenRatio = (float)screenWidth / (float)screenHeight;
|
float screenRatio = (float)screenWidth/(float)screenHeight;
|
||||||
|
|
||||||
if (displayRatio <= screenRatio)
|
if (displayRatio <= screenRatio)
|
||||||
{
|
{
|
||||||
renderWidth = screenWidth;
|
renderWidth = screenWidth;
|
||||||
renderHeight = (int)round((float)screenWidth / displayRatio);
|
renderHeight = (int)round((float)screenWidth/displayRatio);
|
||||||
renderOffsetX = 0;
|
renderOffsetX = 0;
|
||||||
renderOffsetY = (renderHeight - screenHeight);
|
renderOffsetY = (renderHeight - screenHeight);
|
||||||
}
|
}
|
||||||
|
@ -3126,7 +3120,6 @@ static void PollInputEvents(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
|
|
||||||
// Register previous keys states
|
// Register previous keys states
|
||||||
for (int i = 0; i < 512; i++) previousKeyState[i] = currentKeyState[i];
|
for (int i = 0; i < 512; i++) previousKeyState[i] = currentKeyState[i];
|
||||||
|
|
||||||
|
@ -3141,180 +3134,140 @@ static void PollInputEvents(void)
|
||||||
// Register previous mouse states
|
// Register previous mouse states
|
||||||
previousMouseWheelY = currentMouseWheelY;
|
previousMouseWheelY = currentMouseWheelY;
|
||||||
currentMouseWheelY = 0;
|
currentMouseWheelY = 0;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++) previousMouseState[i] = currentMouseState[i];
|
||||||
{
|
|
||||||
previousMouseState[i] = currentMouseState[i];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop over pending messages
|
// Loop over pending messages
|
||||||
while (HasMessageFromUWP())
|
while (HasMessageFromUWP())
|
||||||
{
|
{
|
||||||
UWPMessage* msg = GetMessageFromUWP();
|
UWPMessage *msg = GetMessageFromUWP();
|
||||||
|
|
||||||
switch (msg->Type)
|
switch (msg->type)
|
||||||
{
|
{
|
||||||
case RegisterKey:
|
case UWP_MSG_REGISTER_KEY:
|
||||||
{
|
|
||||||
//Convert from virtualKey
|
|
||||||
int actualKey = -1;
|
|
||||||
|
|
||||||
switch (msg->Int0)
|
|
||||||
{
|
{
|
||||||
case 0x08: actualKey = KEY_BACKSPACE; break;
|
// Convert from virtualKey
|
||||||
case 0x20: actualKey = KEY_SPACE; break;
|
int actualKey = -1;
|
||||||
case 0x1B: actualKey = KEY_ESCAPE; break;
|
|
||||||
case 0x0D: actualKey = KEY_ENTER; break;
|
|
||||||
case 0x2E: actualKey = KEY_DELETE; break;
|
|
||||||
case 0x27: actualKey = KEY_RIGHT; break;
|
|
||||||
case 0x25: actualKey = KEY_LEFT; break;
|
|
||||||
case 0x28: actualKey = KEY_DOWN; break;
|
|
||||||
case 0x26: actualKey = KEY_UP; break;
|
|
||||||
case 0x70: actualKey = KEY_F1; break;
|
|
||||||
case 0x71: actualKey = KEY_F2; break;
|
|
||||||
case 0x72: actualKey = KEY_F3; break;
|
|
||||||
case 0x73: actualKey = KEY_F4; break;
|
|
||||||
case 0x74: actualKey = KEY_F5; break;
|
|
||||||
case 0x75: actualKey = KEY_F6; break;
|
|
||||||
case 0x76: actualKey = KEY_F7; break;
|
|
||||||
case 0x77: actualKey = KEY_F8; break;
|
|
||||||
case 0x78: actualKey = KEY_F9; break;
|
|
||||||
case 0x79: actualKey = KEY_F10; break;
|
|
||||||
case 0x7A: actualKey = KEY_F11; break;
|
|
||||||
case 0x7B: actualKey = KEY_F12; break;
|
|
||||||
case 0xA0: actualKey = KEY_LEFT_SHIFT; break;
|
|
||||||
case 0xA2: actualKey = KEY_LEFT_CONTROL; break;
|
|
||||||
case 0xA4: actualKey = KEY_LEFT_ALT; break;
|
|
||||||
case 0xA1: actualKey = KEY_RIGHT_SHIFT; break;
|
|
||||||
case 0xA3: actualKey = KEY_RIGHT_CONTROL; break;
|
|
||||||
case 0xA5: actualKey = KEY_RIGHT_ALT; break;
|
|
||||||
case 0x30: actualKey = KEY_ZERO; break;
|
|
||||||
case 0x31: actualKey = KEY_ONE; break;
|
|
||||||
case 0x32: actualKey = KEY_TWO; break;
|
|
||||||
case 0x33: actualKey = KEY_THREE; break;
|
|
||||||
case 0x34: actualKey = KEY_FOUR; break;
|
|
||||||
case 0x35: actualKey = KEY_FIVE; break;
|
|
||||||
case 0x36: actualKey = KEY_SIX; break;
|
|
||||||
case 0x37: actualKey = KEY_SEVEN; break;
|
|
||||||
case 0x38: actualKey = KEY_EIGHT; break;
|
|
||||||
case 0x39: actualKey = KEY_NINE; break;
|
|
||||||
case 0x41: actualKey = KEY_A; break;
|
|
||||||
case 0x42: actualKey = KEY_B; break;
|
|
||||||
case 0x43: actualKey = KEY_C; break;
|
|
||||||
case 0x44: actualKey = KEY_D; break;
|
|
||||||
case 0x45: actualKey = KEY_E; break;
|
|
||||||
case 0x46: actualKey = KEY_F; break;
|
|
||||||
case 0x47: actualKey = KEY_G; break;
|
|
||||||
case 0x48: actualKey = KEY_H; break;
|
|
||||||
case 0x49: actualKey = KEY_I; break;
|
|
||||||
case 0x4A: actualKey = KEY_J; break;
|
|
||||||
case 0x4B: actualKey = KEY_K; break;
|
|
||||||
case 0x4C: actualKey = KEY_L; break;
|
|
||||||
case 0x4D: actualKey = KEY_M; break;
|
|
||||||
case 0x4E: actualKey = KEY_N; break;
|
|
||||||
case 0x4F: actualKey = KEY_O; break;
|
|
||||||
case 0x50: actualKey = KEY_P; break;
|
|
||||||
case 0x51: actualKey = KEY_Q; break;
|
|
||||||
case 0x52: actualKey = KEY_R; break;
|
|
||||||
case 0x53: actualKey = KEY_S; break;
|
|
||||||
case 0x54: actualKey = KEY_T; break;
|
|
||||||
case 0x55: actualKey = KEY_U; break;
|
|
||||||
case 0x56: actualKey = KEY_V; break;
|
|
||||||
case 0x57: actualKey = KEY_W; break;
|
|
||||||
case 0x58: actualKey = KEY_X; break;
|
|
||||||
case 0x59: actualKey = KEY_Y; break;
|
|
||||||
case 0x5A: actualKey = KEY_Z; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actualKey > -1)
|
switch (msg->paramInt0)
|
||||||
currentKeyState[actualKey] = msg->Char0;
|
{
|
||||||
break;
|
case 0x08: actualKey = KEY_BACKSPACE; break;
|
||||||
}
|
case 0x20: actualKey = KEY_SPACE; break;
|
||||||
|
case 0x1B: actualKey = KEY_ESCAPE; break;
|
||||||
|
case 0x0D: actualKey = KEY_ENTER; break;
|
||||||
|
case 0x2E: actualKey = KEY_DELETE; break;
|
||||||
|
case 0x27: actualKey = KEY_RIGHT; break;
|
||||||
|
case 0x25: actualKey = KEY_LEFT; break;
|
||||||
|
case 0x28: actualKey = KEY_DOWN; break;
|
||||||
|
case 0x26: actualKey = KEY_UP; break;
|
||||||
|
case 0x70: actualKey = KEY_F1; break;
|
||||||
|
case 0x71: actualKey = KEY_F2; break;
|
||||||
|
case 0x72: actualKey = KEY_F3; break;
|
||||||
|
case 0x73: actualKey = KEY_F4; break;
|
||||||
|
case 0x74: actualKey = KEY_F5; break;
|
||||||
|
case 0x75: actualKey = KEY_F6; break;
|
||||||
|
case 0x76: actualKey = KEY_F7; break;
|
||||||
|
case 0x77: actualKey = KEY_F8; break;
|
||||||
|
case 0x78: actualKey = KEY_F9; break;
|
||||||
|
case 0x79: actualKey = KEY_F10; break;
|
||||||
|
case 0x7A: actualKey = KEY_F11; break;
|
||||||
|
case 0x7B: actualKey = KEY_F12; break;
|
||||||
|
case 0xA0: actualKey = KEY_LEFT_SHIFT; break;
|
||||||
|
case 0xA2: actualKey = KEY_LEFT_CONTROL; break;
|
||||||
|
case 0xA4: actualKey = KEY_LEFT_ALT; break;
|
||||||
|
case 0xA1: actualKey = KEY_RIGHT_SHIFT; break;
|
||||||
|
case 0xA3: actualKey = KEY_RIGHT_CONTROL; break;
|
||||||
|
case 0xA5: actualKey = KEY_RIGHT_ALT; break;
|
||||||
|
case 0x30: actualKey = KEY_ZERO; break;
|
||||||
|
case 0x31: actualKey = KEY_ONE; break;
|
||||||
|
case 0x32: actualKey = KEY_TWO; break;
|
||||||
|
case 0x33: actualKey = KEY_THREE; break;
|
||||||
|
case 0x34: actualKey = KEY_FOUR; break;
|
||||||
|
case 0x35: actualKey = KEY_FIVE; break;
|
||||||
|
case 0x36: actualKey = KEY_SIX; break;
|
||||||
|
case 0x37: actualKey = KEY_SEVEN; break;
|
||||||
|
case 0x38: actualKey = KEY_EIGHT; break;
|
||||||
|
case 0x39: actualKey = KEY_NINE; break;
|
||||||
|
case 0x41: actualKey = KEY_A; break;
|
||||||
|
case 0x42: actualKey = KEY_B; break;
|
||||||
|
case 0x43: actualKey = KEY_C; break;
|
||||||
|
case 0x44: actualKey = KEY_D; break;
|
||||||
|
case 0x45: actualKey = KEY_E; break;
|
||||||
|
case 0x46: actualKey = KEY_F; break;
|
||||||
|
case 0x47: actualKey = KEY_G; break;
|
||||||
|
case 0x48: actualKey = KEY_H; break;
|
||||||
|
case 0x49: actualKey = KEY_I; break;
|
||||||
|
case 0x4A: actualKey = KEY_J; break;
|
||||||
|
case 0x4B: actualKey = KEY_K; break;
|
||||||
|
case 0x4C: actualKey = KEY_L; break;
|
||||||
|
case 0x4D: actualKey = KEY_M; break;
|
||||||
|
case 0x4E: actualKey = KEY_N; break;
|
||||||
|
case 0x4F: actualKey = KEY_O; break;
|
||||||
|
case 0x50: actualKey = KEY_P; break;
|
||||||
|
case 0x51: actualKey = KEY_Q; break;
|
||||||
|
case 0x52: actualKey = KEY_R; break;
|
||||||
|
case 0x53: actualKey = KEY_S; break;
|
||||||
|
case 0x54: actualKey = KEY_T; break;
|
||||||
|
case 0x55: actualKey = KEY_U; break;
|
||||||
|
case 0x56: actualKey = KEY_V; break;
|
||||||
|
case 0x57: actualKey = KEY_W; break;
|
||||||
|
case 0x58: actualKey = KEY_X; break;
|
||||||
|
case 0x59: actualKey = KEY_Y; break;
|
||||||
|
case 0x5A: actualKey = KEY_Z; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
case RegisterClick:
|
if (actualKey > -1) currentKeyState[actualKey] = msg->paramChar0;
|
||||||
{
|
|
||||||
currentMouseState[msg->Int0] = msg->Char0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ScrollWheelUpdate:
|
} break;
|
||||||
{
|
case UWP_MSG_REGISTER_CLICK: currentMouseState[msg->paramInt0] = msg->paramChar0; break;
|
||||||
currentMouseWheelY += msg->Int0;
|
case UWP_MSG_SCROLL_WHEEL_UPDATE: currentMouseWheelY += msg->paramInt0; break;
|
||||||
break;
|
case UWP_MSG_UPDATE_MOUSE_LOCATION: mousePosition = msg->paramVector0; break;
|
||||||
}
|
case UWP_MSG_SET_GAMEPAD_ACTIVE: if (msg->paramInt0 < MAX_GAMEPADS) gamepadReady[msg->paramInt0] = msg->paramBool0; break;
|
||||||
|
case UWP_MSG_SET_GAMEPAD_BUTTON:
|
||||||
|
{
|
||||||
|
if ((msg->paramInt0 < MAX_GAMEPADS) && (msg->paramInt1 < MAX_GAMEPAD_BUTTONS)) currentGamepadState[msg->paramInt0][msg->paramInt1] = msg->paramChar0;
|
||||||
|
} break;
|
||||||
|
case UWP_MSG_SET_GAMEPAD_AXIS:
|
||||||
|
{
|
||||||
|
if ((msg->paramInt0 < MAX_GAMEPADS) && (msg->paramInt1 < MAX_GAMEPAD_AXIS)) gamepadAxisState[msg->paramInt0][msg->paramInt1] = msg->paramFloat0;
|
||||||
|
} break;
|
||||||
|
case UWP_MSG_SET_DISPLAY_DIMS:
|
||||||
|
{
|
||||||
|
displayWidth = msg->paramVector0.x;
|
||||||
|
displayHeight = msg->paramVector0.y;
|
||||||
|
} break;
|
||||||
|
case UWP_MSG_HANDLE_RESIZE:
|
||||||
|
{
|
||||||
|
eglQuerySurface(display, surface, EGL_WIDTH, &screenWidth);
|
||||||
|
eglQuerySurface(display, surface, EGL_HEIGHT, &screenHeight);
|
||||||
|
|
||||||
case UpdateMouseLocation:
|
// If window is resized, viewport and projection matrix needs to be re-calculated
|
||||||
{
|
rlViewport(0, 0, screenWidth, screenHeight); // Set viewport width and height
|
||||||
mousePosition = msg->Vector0;
|
rlMatrixMode(RL_PROJECTION); // Switch to PROJECTION matrix
|
||||||
break;
|
rlLoadIdentity(); // Reset current matrix (PROJECTION)
|
||||||
}
|
rlOrtho(0, screenWidth, screenHeight, 0, 0.0f, 1.0f); // Orthographic projection mode with top-left corner at (0,0)
|
||||||
|
rlMatrixMode(RL_MODELVIEW); // Switch back to MODELVIEW matrix
|
||||||
|
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
||||||
|
rlClearScreenBuffers(); // Clear screen buffers (color and depth)
|
||||||
|
|
||||||
case MarkGamepadActive:
|
// Window size must be updated to be used on 3D mode to get new aspect ratio (BeginMode3D())
|
||||||
{
|
// NOTE: Be careful! GLFW3 will choose the closest fullscreen resolution supported by current monitor,
|
||||||
if (msg->Int0 < MAX_GAMEPADS)
|
// for example, if reescaling back to 800x450 (desired), it could set 720x480 (closest fullscreen supported)
|
||||||
gamepadReady[msg->Int0] = msg->Bool0;
|
currentWidth = screenWidth;
|
||||||
break;
|
currentHeight = screenHeight;
|
||||||
}
|
|
||||||
|
|
||||||
case MarkGamepadButton:
|
// NOTE: Postprocessing texture is not scaled to new size
|
||||||
{
|
|
||||||
if (msg->Int0 < MAX_GAMEPADS && msg->Int1 < MAX_GAMEPAD_BUTTONS)
|
|
||||||
currentGamepadState[msg->Int0][msg->Int1] = msg->Char0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case MarkGamepadAxis:
|
|
||||||
{
|
|
||||||
if (msg->Int0 < MAX_GAMEPADS && msg->Int1 < MAX_GAMEPAD_AXIS)
|
|
||||||
gamepadAxisState[msg->Int0][msg->Int1] = msg->Float0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SetDisplayDims:
|
|
||||||
{
|
|
||||||
displayWidth = msg->Vector0.x;
|
|
||||||
displayHeight = msg->Vector0.y;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case HandleResize:
|
|
||||||
{
|
|
||||||
eglQuerySurface(display, surface, EGL_WIDTH, &screenWidth);
|
|
||||||
eglQuerySurface(display, surface, EGL_HEIGHT, &screenHeight);
|
|
||||||
|
|
||||||
// If window is resized, viewport and projection matrix needs to be re-calculated
|
|
||||||
rlViewport(0, 0, screenWidth, screenHeight); // Set viewport width and height
|
|
||||||
rlMatrixMode(RL_PROJECTION); // Switch to PROJECTION matrix
|
|
||||||
rlLoadIdentity(); // Reset current matrix (PROJECTION)
|
|
||||||
rlOrtho(0, screenWidth, screenHeight, 0, 0.0f, 1.0f); // Orthographic projection mode with top-left corner at (0,0)
|
|
||||||
rlMatrixMode(RL_MODELVIEW); // Switch back to MODELVIEW matrix
|
|
||||||
rlLoadIdentity(); // Reset current matrix (MODELVIEW)
|
|
||||||
rlClearScreenBuffers(); // Clear screen buffers (color and depth)
|
|
||||||
|
|
||||||
// Window size must be updated to be used on 3D mode to get new aspect ratio (BeginMode3D())
|
|
||||||
// NOTE: Be careful! GLFW3 will choose the closest fullscreen resolution supported by current monitor,
|
|
||||||
// for example, if reescaling back to 800x450 (desired), it could set 720x480 (closest fullscreen supported)
|
|
||||||
currentWidth = screenWidth;
|
|
||||||
currentHeight = screenHeight;
|
|
||||||
|
|
||||||
// NOTE: Postprocessing texture is not scaled to new size
|
|
||||||
|
|
||||||
windowResized = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SetGameTime:
|
|
||||||
{
|
|
||||||
currentTime = msg->Double0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
windowResized = true;
|
||||||
|
|
||||||
|
} break;
|
||||||
|
case UWP_MSG_SET_GAME_TIME: currentTime = msg->paramDouble0; break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteUWPMessage(msg); //Delete, we are done
|
DeleteUWPMessage(msg); //Delete, we are done
|
||||||
}
|
}
|
||||||
|
#endif // defined(PLATFORM_UWP)
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
// Mouse input polling
|
// Mouse input polling
|
||||||
|
|
31
src/rlgl.h
31
src/rlgl.h
|
@ -422,8 +422,8 @@ RLAPI void rlTranslatef(float x, float y, float z); // Multiply the current ma
|
||||||
RLAPI void rlRotatef(float angleDeg, float x, float y, float z); // Multiply the current matrix by a rotation matrix
|
RLAPI void rlRotatef(float angleDeg, float x, float y, float z); // Multiply the current matrix by a rotation matrix
|
||||||
RLAPI void rlScalef(float x, float y, float z); // Multiply the current matrix by a scaling matrix
|
RLAPI void rlScalef(float x, float y, float z); // Multiply the current matrix by a scaling matrix
|
||||||
RLAPI void rlMultMatrixf(float *matf); // Multiply the current matrix by another matrix
|
RLAPI void rlMultMatrixf(float *matf); // Multiply the current matrix by another matrix
|
||||||
RLAPI void rlFrustum(double left, double right, double bottom, double top, double near, double far);
|
RLAPI void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
|
||||||
RLAPI void rlOrtho(double left, double right, double bottom, double top, double near, double far);
|
RLAPI void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
|
||||||
RLAPI void rlViewport(int x, int y, int width, int height); // Set the viewport area
|
RLAPI void rlViewport(int x, int y, int width, int height); // Set the viewport area
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
@ -888,14 +888,14 @@ void rlMatrixMode(int mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
|
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar)
|
||||||
{
|
{
|
||||||
glFrustum(left, right, bottom, top, zNear, zFar);
|
glFrustum(left, right, bottom, top, znear, zfar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
|
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar)
|
||||||
{
|
{
|
||||||
glOrtho(left, right, bottom, top, zNear, zFar);
|
glOrtho(left, right, bottom, top, znear, zfar);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rlPushMatrix(void) { glPushMatrix(); }
|
void rlPushMatrix(void) { glPushMatrix(); }
|
||||||
|
@ -1491,7 +1491,6 @@ void rlglInit(int width, int height)
|
||||||
GLint numExt = 0;
|
GLint numExt = 0;
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_33)
|
#if defined(GRAPHICS_API_OPENGL_33)
|
||||||
|
|
||||||
// NOTE: On OpenGL 3.3 VAO and NPOT are supported by default
|
// NOTE: On OpenGL 3.3 VAO and NPOT are supported by default
|
||||||
vaoSupported = true;
|
vaoSupported = true;
|
||||||
|
|
||||||
|
@ -1504,12 +1503,7 @@ void rlglInit(int width, int height)
|
||||||
// NOTE: We don't need to check again supported extensions but we do (GLAD already dealt with that)
|
// NOTE: We don't need to check again supported extensions but we do (GLAD already dealt with that)
|
||||||
glGetIntegerv(GL_NUM_EXTENSIONS, &numExt);
|
glGetIntegerv(GL_NUM_EXTENSIONS, &numExt);
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
const char **extList = RL_MALLOC(sizeof(const char *)*numExt);
|
const char **extList = RL_MALLOC(sizeof(const char *)*numExt);
|
||||||
#else
|
|
||||||
const char *extList[numExt];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < numExt; i++) extList[i] = (char *)glGetStringi(GL_EXTENSIONS, i);
|
for (int i = 0; i < numExt; i++) extList[i] = (char *)glGetStringi(GL_EXTENSIONS, i);
|
||||||
|
|
||||||
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
#elif defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
|
@ -1523,10 +1517,10 @@ void rlglInit(int width, int height)
|
||||||
// NOTE: String could be splitted using strtok() function (string.h)
|
// NOTE: String could be splitted using strtok() function (string.h)
|
||||||
// NOTE: strtok() modifies the passed string, it can not be const
|
// NOTE: strtok() modifies the passed string, it can not be const
|
||||||
|
|
||||||
char *extList[512]; // Allocate 512 strings pointers (2 KB)
|
// Allocate 512 strings pointers (2 KB)
|
||||||
|
const char **extList = RL_MALLOC(sizeof(const char *)*512);
|
||||||
|
|
||||||
extList[numExt] = strtok(extensionsDup, " ");
|
extList[numExt] = strtok(extensionsDup, " ");
|
||||||
|
|
||||||
while (extList[numExt] != NULL)
|
while (extList[numExt] != NULL)
|
||||||
{
|
{
|
||||||
numExt++;
|
numExt++;
|
||||||
|
@ -1619,9 +1613,7 @@ void rlglInit(int width, int height)
|
||||||
if (strcmp(extList[i], (const char *)"GL_EXT_debug_marker") == 0) debugMarkerSupported = true;
|
if (strcmp(extList[i], (const char *)"GL_EXT_debug_marker") == 0) debugMarkerSupported = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER) && !defined(PLATFORM_UWP) //is this a hotfix? I may need to find out why this is broken
|
|
||||||
RL_FREE(extList);
|
RL_FREE(extList);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(GRAPHICS_API_OPENGL_ES2)
|
#if defined(GRAPHICS_API_OPENGL_ES2)
|
||||||
if (vaoSupported) TraceLog(LOG_INFO, "[EXTENSION] VAO extension detected, VAO functions initialized successfully");
|
if (vaoSupported) TraceLog(LOG_INFO, "[EXTENSION] VAO extension detected, VAO functions initialized successfully");
|
||||||
|
@ -1642,11 +1634,8 @@ void rlglInit(int width, int height)
|
||||||
|
|
||||||
if (debugMarkerSupported) TraceLog(LOG_INFO, "[EXTENSION] Debug Marker supported");
|
if (debugMarkerSupported) TraceLog(LOG_INFO, "[EXTENSION] Debug Marker supported");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Initialize buffers, default shaders and default textures
|
// Initialize buffers, default shaders and default textures
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Init default white texture
|
// Init default white texture
|
||||||
unsigned char pixels[4] = { 255, 255, 255, 255 }; // 1 pixel RGBA (4 bytes)
|
unsigned char pixels[4] = { 255, 255, 255, 255 }; // 1 pixel RGBA (4 bytes)
|
||||||
defaultTextureId = rlLoadTexture(pixels, 1, 1, UNCOMPRESSED_R8G8B8A8, 1);
|
defaultTextureId = rlLoadTexture(pixels, 1, 1, UNCOMPRESSED_R8G8B8A8, 1);
|
||||||
|
@ -4623,6 +4612,6 @@ int GetPixelDataSize(int width, int height, int format)
|
||||||
|
|
||||||
return dataSize;
|
return dataSize;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // RLGL_STANDALONE
|
||||||
|
|
||||||
#endif // RLGL_IMPLEMENTATION
|
#endif // RLGL_IMPLEMENTATION
|
63
src/utils.c
63
src/utils.c
|
@ -205,73 +205,64 @@ static int android_close(void *cookie)
|
||||||
|
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
|
|
||||||
#define MAX_MESSAGES 512 //If there are over 128 messages, I will cry... either way, this may be too much EDIT: Welp, 512
|
#define MAX_MESSAGES 512 // If there are over 128 messages, I will cry... either way, this may be too much EDIT: Welp, 512
|
||||||
|
|
||||||
static int UWPOutMessageId = -1; //Stores the last index for the message
|
static int UWPOutMessageId = -1; // Stores the last index for the message
|
||||||
static UWPMessage* UWPOutMessages[MAX_MESSAGES]; //Messages out to UWP
|
static UWPMessage* UWPOutMessages[MAX_MESSAGES]; // Messages out to UWP
|
||||||
|
|
||||||
static int UWPInMessageId = -1; //Stores the last index for the message
|
static int UWPInMessageId = -1; // Stores the last index for the message
|
||||||
static UWPMessage* UWPInMessages[MAX_MESSAGES]; //Messages in from UWP
|
static UWPMessage* UWPInMessages[MAX_MESSAGES]; // Messages in from UWP
|
||||||
|
|
||||||
UWPMessage* CreateUWPMessage(void)
|
UWPMessage* CreateUWPMessage(void)
|
||||||
{
|
{
|
||||||
UWPMessage* msg = (UWPMessage*)RL_MALLOC(sizeof(UWPMessage));
|
UWPMessage *msg = (UWPMessage *)RL_MALLOC(sizeof(UWPMessage));
|
||||||
msg->Type = None;
|
msg->type = UWP_MSG_NONE;
|
||||||
Vector2 v0 = {0, 0};
|
Vector2 v0 = { 0, 0 };
|
||||||
msg->Vector0 = v0;
|
msg->paramVector0 = v0;
|
||||||
msg->Int0 = 0;
|
msg->paramInt0 = 0;
|
||||||
msg->Int1 = 0;
|
msg->paramInt1 = 0;
|
||||||
msg->Char0 = 0;
|
msg->paramChar0 = 0;
|
||||||
msg->Float0 = 0;
|
msg->paramFloat0 = 0;
|
||||||
msg->Double0 = 0;
|
msg->paramDouble0 = 0;
|
||||||
msg->Bool0 = false;
|
msg->paramBool0 = false;
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeleteUWPMessage(UWPMessage* msg)
|
void DeleteUWPMessage(UWPMessage *msg)
|
||||||
{
|
{
|
||||||
RL_FREE(msg);
|
RL_FREE(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UWPHasMessages(void)
|
bool UWPHasMessages(void)
|
||||||
{
|
{
|
||||||
return UWPOutMessageId > -1;
|
return (UWPOutMessageId > -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
UWPMessage* UWPGetMessage(void)
|
UWPMessage *UWPGetMessage(void)
|
||||||
{
|
{
|
||||||
if (UWPHasMessages())
|
if (UWPHasMessages()) return UWPOutMessages[UWPOutMessageId--];
|
||||||
{
|
|
||||||
return UWPOutMessages[UWPOutMessageId--];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UWPSendMessage(UWPMessage* msg)
|
void UWPSendMessage(UWPMessage *msg)
|
||||||
{
|
{
|
||||||
if (UWPInMessageId + 1 < MAX_MESSAGES)
|
if (UWPInMessageId + 1 < MAX_MESSAGES)
|
||||||
{
|
{
|
||||||
UWPInMessageId++;
|
UWPInMessageId++;
|
||||||
UWPInMessages[UWPInMessageId] = msg;
|
UWPInMessages[UWPInMessageId] = msg;
|
||||||
}
|
}
|
||||||
else
|
else TraceLog(LOG_WARNING, "[UWP Messaging] Not enough array space to register new UWP inbound Message.");
|
||||||
{
|
|
||||||
TraceLog(LOG_WARNING, "[UWP Messaging] Not enough array space to register new UWP inbound Message.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendMessageToUWP(UWPMessage* msg)
|
void SendMessageToUWP(UWPMessage *msg)
|
||||||
{
|
{
|
||||||
if (UWPOutMessageId + 1 < MAX_MESSAGES)
|
if (UWPOutMessageId + 1 < MAX_MESSAGES)
|
||||||
{
|
{
|
||||||
UWPOutMessageId++;
|
UWPOutMessageId++;
|
||||||
UWPOutMessages[UWPOutMessageId] = msg;
|
UWPOutMessages[UWPOutMessageId] = msg;
|
||||||
}
|
}
|
||||||
else
|
else TraceLog(LOG_WARNING, "[UWP Messaging] Not enough array space to register new UWP outward Message.");
|
||||||
{
|
|
||||||
TraceLog(LOG_WARNING, "[UWP Messaging] Not enough array space to register new UWP outward Message.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HasMessageFromUWP(void)
|
bool HasMessageFromUWP(void)
|
||||||
|
@ -281,12 +272,8 @@ bool HasMessageFromUWP(void)
|
||||||
|
|
||||||
UWPMessage* GetMessageFromUWP(void)
|
UWPMessage* GetMessageFromUWP(void)
|
||||||
{
|
{
|
||||||
if (HasMessageFromUWP())
|
if (HasMessageFromUWP()) return UWPInMessages[UWPInMessageId--];
|
||||||
{
|
|
||||||
return UWPInMessages[UWPInMessageId--];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif // defined(PLATFORM_UWP)
|
||||||
#endif
|
|
||||||
|
|
88
src/utils.h
88
src/utils.h
|
@ -60,79 +60,63 @@ FILE *android_fopen(const char *fileName, const char *mode); // Replacement f
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
|
|
||||||
// UWP Messages System
|
// UWP Messages System
|
||||||
|
typedef enum {
|
||||||
|
UWP_MSG_NONE = 0,
|
||||||
|
|
||||||
typedef enum
|
// Send
|
||||||
{
|
UWP_MSG_SHOW_MOUSE,
|
||||||
None = 0,
|
UWP_MSG_HIDE_MOUSE,
|
||||||
|
UWP_MSG_LOCK_MOUSE,
|
||||||
|
UWP_MSG_UNLOCK_MOUSE,
|
||||||
|
UWP_MSG_SET_MOUSE_LOCATION, // paramVector0 (pos)
|
||||||
|
|
||||||
//Send
|
// Receive (Into C)
|
||||||
ShowMouse,
|
UWP_MSG_REGISTER_KEY, // paramInt0 (key), paramChar0 (status)
|
||||||
HideMouse,
|
UWP_MSG_REGISTER_CLICK, // paramInt0 (button), paramChar0 (status)
|
||||||
LockMouse,
|
UWP_MSG_SCROLL_WHEEL_UPDATE, // paramInt0 (delta)
|
||||||
UnlockMouse,
|
UWP_MSG_UPDATE_MOUSE_LOCATION, // paramVector0 (pos)
|
||||||
SetMouseLocation, //Vector0 (pos)
|
UWP_MSG_SET_GAMEPAD_ACTIVE, // paramInt0 (gamepad), paramBool0 (active or not)
|
||||||
|
UWP_MSG_SET_GAMEPAD_BUTTON, // paramInt0 (gamepad), paramInt1 (button), paramChar0 (status)
|
||||||
//Recieve (Into C)
|
UWP_MSG_SET_GAMEPAD_AXIS, // paramInt0 (gamepad), int1 (axis), paramFloat0 (value)
|
||||||
RegisterKey, //Int0 (key), Char0 (status)
|
UWP_MSG_SET_DISPLAY_DIMS, // paramVector0 (display dimensions)
|
||||||
RegisterClick, //Int0 (button), Char0 (status)
|
UWP_MSG_HANDLE_RESIZE, // paramVector0 (new dimensions) - Onresized event
|
||||||
ScrollWheelUpdate, //Int0 (delta)
|
UWP_MSG_SET_GAME_TIME, // paramInt0
|
||||||
UpdateMouseLocation, //Vector0 (pos)
|
|
||||||
MarkGamepadActive, //Int0 (gamepad), Bool0 (active or not)
|
|
||||||
MarkGamepadButton, //Int0 (gamepad), Int1 (button), Char0 (status)
|
|
||||||
MarkGamepadAxis,//Int0 (gamepad), int1 (axis), Float0 (value)
|
|
||||||
SetDisplayDims, //Vector0 (display dimensions)
|
|
||||||
HandleResize, //Vector0 (new dimensions) - Onresized event
|
|
||||||
SetGameTime, //Int0
|
|
||||||
} UWPMessageType;
|
} UWPMessageType;
|
||||||
|
|
||||||
typedef struct UWPMessage
|
typedef struct UWPMessage {
|
||||||
{
|
UWPMessageType type; // Message type
|
||||||
//The message type
|
|
||||||
UWPMessageType Type;
|
Vector2 paramVector0; // Vector parameters
|
||||||
|
int paramInt0; // Int parameter
|
||||||
|
int paramInt1; // Int parameter
|
||||||
|
char paramChar0; // Char parameters
|
||||||
|
float paramFloat0; // Float parameters
|
||||||
|
double paramDouble0; // Double parameters
|
||||||
|
bool paramBool0; // Bool parameters
|
||||||
|
|
||||||
//Vector parameters
|
// More parameters can be added and fed to functions
|
||||||
Vector2 Vector0;
|
|
||||||
|
|
||||||
//Int parameters
|
|
||||||
int Int0;
|
|
||||||
int Int1;
|
|
||||||
|
|
||||||
//Char parameters
|
|
||||||
char Char0;
|
|
||||||
|
|
||||||
//Float parameters
|
|
||||||
float Float0;
|
|
||||||
|
|
||||||
//Double parameters
|
|
||||||
double Double0;
|
|
||||||
|
|
||||||
//Bool parameters
|
|
||||||
bool Bool0;
|
|
||||||
|
|
||||||
//More parameters can be added and fed to functions
|
|
||||||
} UWPMessage;
|
} UWPMessage;
|
||||||
|
|
||||||
//Allocate UWP Message
|
// Allocate UWP Message
|
||||||
RLAPI UWPMessage* CreateUWPMessage(void);
|
RLAPI UWPMessage* CreateUWPMessage(void);
|
||||||
|
|
||||||
//Free UWP Message
|
// Free UWP Message
|
||||||
RLAPI void DeleteUWPMessage(UWPMessage* msg);
|
RLAPI void DeleteUWPMessage(UWPMessage* msg);
|
||||||
|
|
||||||
//Get messages into C++
|
// Get messages into C++
|
||||||
RLAPI bool UWPHasMessages(void);
|
RLAPI bool UWPHasMessages(void);
|
||||||
RLAPI UWPMessage* UWPGetMessage(void);
|
RLAPI UWPMessage* UWPGetMessage(void);
|
||||||
RLAPI void UWPSendMessage(UWPMessage* msg);
|
RLAPI void UWPSendMessage(UWPMessage* msg);
|
||||||
|
|
||||||
//For C to call
|
// For C to call
|
||||||
#ifndef _cplusplus //Hide from C++ code
|
#ifndef __cplusplus // Hide from C++ code
|
||||||
void SendMessageToUWP(UWPMessage* msg);
|
void SendMessageToUWP(UWPMessage* msg);
|
||||||
bool HasMessageFromUWP(void);
|
bool HasMessageFromUWP(void);
|
||||||
UWPMessage* GetMessageFromUWP(void);
|
UWPMessage* GetMessageFromUWP(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif //defined(PLATFORM_UWP)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue