Character inputs and filesystem stuff

This commit is contained in:
Reece Mackie 2020-04-30 14:55:19 +01:00
commit 3767a324a7
2 changed files with 25 additions and 4 deletions

View file

@ -2233,6 +2233,10 @@ void SaveStorageValue(unsigned int position, int value)
strcpy(path, CORE.Android.internalDataPath);
strcat(path, "/");
strcat(path, STORAGE_DATA_FILE);
#elif defined(PLATFORM_UWP)
strcpy(path, CORE.UWP.internalDataPath);
strcat(path, "/");
strcat(path, STORAGE_DATA_FILE);
#else
strcpy(path, STORAGE_DATA_FILE);
#endif
@ -2306,6 +2310,10 @@ int LoadStorageValue(unsigned int position)
strcpy(path, CORE.Android.internalDataPath);
strcat(path, "/");
strcat(path, STORAGE_DATA_FILE);
#elif defined(PLATFORM_UWP)
strcpy(path, CORE.UWP.internalDataPath);
strcat(path, "/");
strcat(path, STORAGE_DATA_FILE);
#else
strcpy(path, STORAGE_DATA_FILE);
#endif
@ -5371,14 +5379,16 @@ void UWPKeyDownEvent(int key, bool down, bool controlKey)
{
CORE.Input.Keyboard.currentKeyState[key] = down;
}
}
// TODO:
/*if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_CHARS_QUEUE)
void UWPKeyCharEvent(int key)
{
if (CORE.Input.Keyboard.keyPressedQueueCount < MAX_CHARS_QUEUE)
{
// Add character to the queue
CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;
CORE.Input.Keyboard.keyPressedQueueCount++;
}*/
}
}
void UWPMouseButtonEvent(int button, bool down)

View file

@ -36,6 +36,7 @@ extern "C" {
// Determine if UWP functions are set and ready for raylib's use.
bool UWPIsConfigured();
// Call this to set the UWP data path you wish for saving and loading.
void UWPSetDataPath(const char* path);
// Function for getting program time.
@ -75,6 +76,9 @@ void UWPSetMouseSetPosFunc(UWPMouseSetPosFunc func);
// Call this when a Key is pressed or released.
void UWPKeyDownEvent(int key, bool down, bool controlKey);
// Call this on the CoreWindow::CharacterRecieved event
void UWPKeyCharEvent(int key);
// Call when a mouse button state changes
void UWPMouseButtonEvent(int button, bool down);