galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Platform.cpp
Go to the documentation of this file.
1
7
8
#include <cstdlib>
9
#include <ctime>
10
11
#include <SDL3/SDL_hints.h>
12
#include <SDL3/SDL_init.h>
13
14
#include "
Platform.hpp
"
15
16
namespace
galaxy
17
{
18
namespace
platform
19
{
20
void
seed_random
() noexcept
21
{
22
std::srand(
static_cast<
unsigned
int
>
(std::time(
nullptr
)));
23
}
24
25
void
set_metadata
(
const
char
* type,
const
char
* value)
noexcept
26
{
27
SDL_SetAppMetadataProperty(type, value);
28
}
29
30
void
set_hint
(
const
char
* hint,
const
char
* value)
noexcept
31
{
32
SDL_SetHintWithPriority(hint, value, SDL_HINT_OVERRIDE);
33
}
34
}
// namespace platform
35
}
// namespace galaxy
Platform.hpp
galaxy::platform::seed_random
void seed_random() noexcept
Seed the cstdlib rng algos.
Definition
Platform.cpp:20
galaxy::platform::set_metadata
void set_metadata(const char *type, const char *value) noexcept
Sets metadata.
Definition
Platform.cpp:25
galaxy::platform::set_hint
void set_hint(const char *hint, const char *value) noexcept
Sets SDL hints.
Definition
Platform.cpp:30
galaxy
Animated.cpp galaxy.
Definition
Animated.cpp:16
galaxy
src
galaxy
platform
Platform.cpp
Generated on Fri Sep 12 2025 07:29:48 for galaxy by
1.12.0