19 : _mainLoopPaused{
false}
20 , _mainLoopActive{
false}
21 , _freezeRendering{
false}
32 assert( !entryPoint.empty() );
40 for (
I32 i = 1; i < argc; ++i)
51 _kernel = std::make_unique<Kernel>(argc,
argv, *
this);
178 switch ( event.type )
182 RequestShutdown(
false );
184 case SDL_APP_TERMINATING:
187 RequestShutdown(
false );
189 case SDL_RENDER_TARGETS_RESET :
194 case SDL_RENDER_DEVICE_RESET :
197 RequestShutdown(
false );
199 case SDL_APP_LOWMEMORY :
202 RequestShutdown(
false );
207 case SDL_DROPCOMPLETE:
211 case SDL_FINGERDOWN :
213 case SDL_FINGERMOTION :
214 case SDL_DOLLARGESTURE :
215 case SDL_DOLLARRECORD :
216 case SDL_MULTIGESTURE :
223 return ShutdownRequested();
252 return s_supportedDisplayModes[displayIndex];
267 s_maxMSAASAmples = std::min( maxSampleCount,
to_U8( 64u ) );
#define PROFILE_FRAME(NAME)
bool mainLoopActive() const
bool onSDLEvent(SDL_Event event) noexcept override
bool RestartRequested() const noexcept
std::unique_ptr< Kernel > _kernel
void CancelShutdown() noexcept
void stop(const AppStepResult stepResult)
WindowManager & windowManager() noexcept
bool onResolutionChange(const SizeChangeParams ¶ms) const
ErrorCode start(const string &entryPoint, I32 argc, char **argv)
bool ShutdownRequested() const noexcept
ErrorCode setRenderingAPI(const RenderAPI api)
WindowManager _windowManager
bool onProfilerStateChanged(Profiler::State state)
bool onWindowSizeChange(const SizeChangeParams ¶ms) const
void CancelRestart() noexcept
static void Reset() noexcept
static void onResolutionChange(Kernel *kernel, const SizeChangeParams ¶ms)
static ErrorCode initialize(Kernel *kernel, const string &entryPoint)
static void onLoop(Kernel *kernel)
static void shutdown(Kernel *kernel)
static void onWindowSizeChange(Kernel *kernel, const SizeChangeParams ¶ms)
static void warmup(Kernel *kernel)
Configuration & config() noexcept
ErrorCode init(PlatformContext &context, RenderAPI renderingAPI, vec2< I16 > initialPosition, vec2< U16 > initialSize, WindowMode windowMode, I32 targetDisplayIndex)
Handle console commands that start with a forward slash.
bool deleteAllFiles(const ResourcePath &filePath, const char *extension, const char *extensionToSkip)
constexpr U8 to_U8(const T value)
bool enableRenderAPIDebugging
bool assertOnRenderAPIError
struct Divide::Configuration::Debug::Renderer renderer
struct Divide::Configuration::Runtime runtime
struct Divide::Configuration::Debug debug
static void ToggleFlag(const Flags flag, const bool state)
static NO_INLINE void errorfn(const char *format, T &&... args)
static NO_INLINE void warnfn(const char *format, T &&... args)
static NO_INLINE void printfn(const char *format, T &&... args)
vector< OutputDisplayProperties > OutputDisplayPropertiesContainer
static void SetActiveDisplayCount(const U8 displayCount)
static U8 ActiveDisplayCount() noexcept
static void RegisterDisplayMode(const U8 displayIndex, const OutputDisplayProperties &mode)
static U8 MaxMSAASamples() noexcept
static U8 s_activeDisplayCount
static const OutputDisplayPropertiesContainer & GetDisplayModes(const size_t displayIndex) noexcept
static std::array< OutputDisplayPropertiesContainer, g_maxDisplayOutputs > s_supportedDisplayModes
static constexpr U8 g_maxDisplayOutputs
static U8 s_maxMSAASAmples
static void Reset() noexcept