diff options
| author | Reece Mackie <[email protected]> | 2020-04-30 18:48:39 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-30 19:48:39 +0200 |
| commit | 4b0386081037172222d91f0ccca93e5810fed84b (patch) | |
| tree | 3a554752c00af2255a4caecb553e19cd4b37cb7f /src/utils.c | |
| parent | 2f454aa4b051d000daab0dd71417a716af095e91 (diff) | |
| download | raylib-4b0386081037172222d91f0ccca93e5810fed84b.tar.gz raylib-4b0386081037172222d91f0ccca93e5810fed84b.zip | |
UWP rework (#1231)
* First draft of UWP rework.
* Read desc
- Moved UWP specific functions to uwp_events.h
- Removed BaseApp.
- Implemented example UWP lifecycle.
* Added GIF recording and screenshot support.
* Character inputs and filesystem stuff
* Fix game closing on Xbox when B is pressed.
* Fix the gamepad binding hack
* Add as many keys as I believe are possible.
* Implemented mouse locking of a sort.
* Remove rogue todo, the rest are for a game dev using this example.
* Implemented touch how I "think" it should work. I cant test this.
* Review.
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/utils.c b/src/utils.c index 02a53abc..74b33b50 100644 --- a/src/utils.c +++ b/src/utils.c @@ -68,13 +68,6 @@ static AAssetManager *assetManager = NULL; // Android assets manage static const char *internalDataPath = NULL; // Android internal data path #endif -#if defined(PLATFORM_UWP) -static int UWPOutMessageId = -1; // Last index of output message -static UWPMessage *UWPOutMessages[MAX_UWP_MESSAGES]; // Messages out to UWP -static int UWPInMessageId = -1; // Last index of input message -static UWPMessage *UWPInMessages[MAX_UWP_MESSAGES]; // Messages in from UWP -#endif - //---------------------------------------------------------------------------------- // Module specific Functions Declaration //---------------------------------------------------------------------------------- @@ -361,69 +354,3 @@ static int android_close(void *cookie) return 0; } #endif // PLATFORM_ANDROID - -#if defined(PLATFORM_UWP) -UWPMessage *CreateUWPMessage(void) -{ - UWPMessage *msg = (UWPMessage *)RL_MALLOC(sizeof(UWPMessage)); - msg->type = UWP_MSG_NONE; - Vector2 v0 = { 0, 0 }; - msg->paramVector0 = v0; - msg->paramInt0 = 0; - msg->paramInt1 = 0; - msg->paramChar0 = 0; - msg->paramFloat0 = 0; - msg->paramDouble0 = 0; - msg->paramBool0 = false; - return msg; -} - -void DeleteUWPMessage(UWPMessage *msg) -{ - RL_FREE(msg); -} - -bool UWPHasMessages(void) -{ - return (UWPOutMessageId > -1); -} - -UWPMessage *UWPGetMessage(void) -{ - if (UWPHasMessages()) return UWPOutMessages[UWPOutMessageId--]; - - return NULL; -} - -void UWPSendMessage(UWPMessage *msg) -{ - if ((UWPInMessageId + 1) < MAX_UWP_MESSAGES) - { - UWPInMessageId++; - UWPInMessages[UWPInMessageId] = msg; - } - else TRACELOG(LOG_WARNING, "UWP: Not enough array space to register new inbound message"); -} - -void SendMessageToUWP(UWPMessage *msg) -{ - if ((UWPOutMessageId + 1) < MAX_UWP_MESSAGES) - { - UWPOutMessageId++; - UWPOutMessages[UWPOutMessageId] = msg; - } - else TRACELOG(LOG_WARNING, "UWP: Not enough array space to register new outward message"); -} - -bool HasMessageFromUWP(void) -{ - return UWPInMessageId > -1; -} - -UWPMessage *GetMessageFromUWP(void) -{ - if (HasMessageFromUWP()) return UWPInMessages[UWPInMessageId--]; - - return NULL; -} -#endif // PLATFORM_UWP |
