Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
a51c332d
Commit
a51c332d
authored
Feb 06, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created a simpler version of SDL_SetHint() that doesn't need a priority.
parent
8b3eb38d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
SDL_hints.h
include/SDL_hints.h
+12
-3
SDL_hints.c
src/SDL_hints.c
+8
-1
No files found.
include/SDL_hints.h
View file @
a51c332d
...
@@ -106,7 +106,7 @@ typedef enum
...
@@ -106,7 +106,7 @@ typedef enum
/**
/**
* \brief Set a hint
* \brief Set a hint
with a specific priority
*
*
* The priority controls the behavior when setting a hint that already
* The priority controls the behavior when setting a hint that already
* has a value. Hints will replace existing hints of their priority and
* has a value. Hints will replace existing hints of their priority and
...
@@ -114,9 +114,18 @@ typedef enum
...
@@ -114,9 +114,18 @@ typedef enum
*
*
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
*/
*/
extern
DECLSPEC
SDL_bool
SDLCALL
SDL_SetHintWithPriority
(
const
char
*
name
,
const
char
*
value
,
SDL_HintPriority
priority
);
/**
* \brief Set a hint with normal priority
*
* \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
*/
extern
DECLSPEC
SDL_bool
SDLCALL
SDL_SetHint
(
const
char
*
name
,
extern
DECLSPEC
SDL_bool
SDLCALL
SDL_SetHint
(
const
char
*
name
,
const
char
*
value
,
const
char
*
value
);
SDL_HintPriority
priority
);
/**
/**
* \brief Get a hint
* \brief Get a hint
...
...
src/SDL_hints.c
View file @
a51c332d
...
@@ -38,7 +38,8 @@ static SDL_Hint *SDL_hints;
...
@@ -38,7 +38,8 @@ static SDL_Hint *SDL_hints;
SDL_bool
SDL_bool
SDL_SetHint
(
const
char
*
name
,
const
char
*
value
,
SDL_HintPriority
priority
)
SDL_SetHintWithPriority
(
const
char
*
name
,
const
char
*
value
,
SDL_HintPriority
priority
)
{
{
const
char
*
env
;
const
char
*
env
;
SDL_Hint
*
prev
,
*
hint
;
SDL_Hint
*
prev
,
*
hint
;
...
@@ -80,6 +81,12 @@ SDL_SetHint(const char *name, const char *value, SDL_HintPriority priority)
...
@@ -80,6 +81,12 @@ SDL_SetHint(const char *name, const char *value, SDL_HintPriority priority)
return
SDL_TRUE
;
return
SDL_TRUE
;
}
}
SDL_bool
SDL_SetHint
(
const
char
*
name
,
const
char
*
value
)
{
return
SDL_SetHintWithPriority
(
name
,
value
,
SDL_HINT_NORMAL
);
}
const
char
*
const
char
*
SDL_GetHint
(
const
char
*
name
)
SDL_GetHint
(
const
char
*
name
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment