35 lines
619 B
C++
35 lines
619 B
C++
|
|
#ifndef CCONTEXT_HPP
|
||
|
|
#define CCONTEXT_HPP
|
||
|
|
|
||
|
|
#include <SDL3/SDL.h>
|
||
|
|
#include <SDL3/SDL_init.h>
|
||
|
|
#include <SDL3_image/SDL_image.h>
|
||
|
|
|
||
|
|
#define LOG_FILE "CosmicEngine_%3N.log"
|
||
|
|
#define LOG_ROTATION_SIZE 1 * 1024 * 1024
|
||
|
|
#define LOG_MAX_SIZE 50 * 1024 * 1024
|
||
|
|
|
||
|
|
class CContext {
|
||
|
|
private:
|
||
|
|
// Say if the screenSaver is enabled.
|
||
|
|
static bool m_screenSaver;
|
||
|
|
|
||
|
|
public:
|
||
|
|
CContext(void) = delete;
|
||
|
|
|
||
|
|
static void init(SDL_InitFlags sdlFlags);
|
||
|
|
|
||
|
|
static void quit(void);
|
||
|
|
|
||
|
|
static bool isScreenSaverEnable(void);
|
||
|
|
|
||
|
|
|
||
|
|
static void setScreenSaverEnable(bool newScreenSaver);
|
||
|
|
|
||
|
|
private:
|
||
|
|
|
||
|
|
static void initLog(void);
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|