mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added util/platform module
This commit is contained in:
parent
ab7e832218
commit
665347213d
2 changed files with 22 additions and 0 deletions
14
src/util/platform.cpp
Normal file
14
src/util/platform.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "platform.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <Windows.h>
|
||||
|
||||
void platform::configure_encoding() {
|
||||
// set utf-8 encoding to console output
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
setvbuf(stdout, nullptr, _IOFBF, 1000);
|
||||
}
|
||||
#else
|
||||
void platform::configure_encoding(){
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue