2017-10-31 17:12:50 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef ES_CORE_PLATFORM_H
|
|
|
|
#define ES_CORE_PLATFORM_H
|
|
|
|
|
2017-11-01 22:21:10 +00:00
|
|
|
#include <string>
|
|
|
|
|
2019-08-08 20:16:11 +00:00
|
|
|
//why the hell this naming inconsistency exists is well beyond me
|
|
|
|
#ifdef WIN32
|
|
|
|
#define sleep Sleep
|
2012-09-10 18:48:00 +00:00
|
|
|
#endif
|
2013-05-13 19:53:28 +00:00
|
|
|
|
2019-08-14 23:50:23 +00:00
|
|
|
enum QuitMode
|
|
|
|
{
|
|
|
|
QUIT = 0,
|
|
|
|
RESTART = 1,
|
|
|
|
SHUTDOWN = 2,
|
|
|
|
REBOOT = 3
|
|
|
|
};
|
|
|
|
|
2016-01-17 04:24:28 +00:00
|
|
|
int runSystemCommand(const std::string& cmd_utf8); // run a utf-8 encoded in the shell (requires wstring conversion on Windows)
|
2019-08-14 23:50:23 +00:00
|
|
|
int quitES(QuitMode mode = QuitMode::QUIT);
|
|
|
|
void processQuitMode();
|
2017-10-31 17:12:50 +00:00
|
|
|
|
|
|
|
#endif // ES_CORE_PLATFORM_H
|