mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
70438be272
WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
/* See COPYING.txt for the full license governing this code. */
|
|
/**
|
|
* \file SDL_visualtest_parsehelper.h
|
|
*
|
|
* Header with some helper functions for parsing strings.
|
|
*/
|
|
|
|
#ifndef _SDL_visualtest_parsehelper_h
|
|
#define _SDL_visualtest_parsehelper_h
|
|
|
|
/* Set up for C function definitions, even when using C++ */
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Takes an string of command line arguments and breaks them up into an array
|
|
* based on whitespace.
|
|
*
|
|
* \param args The string of arguments.
|
|
*
|
|
* \return NULL on failure, an array of strings on success. The last element
|
|
* of the array is NULL. The first element of the array is NULL and should
|
|
* be set to the path of the executable by the caller.
|
|
*/
|
|
char** SDLVisualTest_ParseArgsToArgv(char* args);
|
|
|
|
/**
|
|
* Takes a string and breaks it into tokens by splitting on whitespace.
|
|
*
|
|
* \param str The string to be split.
|
|
* \param max_token_len Length of each element in the array to be returned.
|
|
*
|
|
* \return NULL on failure; an array of strings with the tokens on success. The
|
|
* last element of the array is NULL.
|
|
*/
|
|
char** SDLVisualTest_Tokenize(char* str, int max_token_len);
|
|
|
|
/* Ends C function definitions when using C++ */
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _SDL_visualtest_parsehelper_h */
|