fix windows
This commit is contained in:
parent
e0c6f631ab
commit
f1def38e3d
4 changed files with 14 additions and 9 deletions
|
|
@ -15,8 +15,6 @@ void GSInit(void) {
|
|||
GSVersionGet(&version);
|
||||
|
||||
GSLog(GSLogInfo, "GearSrc Engine %s", version.string);
|
||||
|
||||
gload_init();
|
||||
}
|
||||
|
||||
int GSEngineRegisterResource(GSEngine engine, const char* name, const char* path) {
|
||||
|
|
@ -45,6 +43,8 @@ GSEngine GSEngineCreate(GSEngineParam* param) {
|
|||
param->ready(engine->width, engine->height);
|
||||
}
|
||||
|
||||
gload_init();
|
||||
|
||||
sh_new_strdup(engine->resource);
|
||||
|
||||
GSEngineRegisterResource(engine, "base", "base.pak");
|
||||
|
|
|
|||
|
|
@ -5,6 +5,15 @@ void GSLog(int level, const char* fmt, ...) {
|
|||
FILE* out = stdout;
|
||||
|
||||
#ifdef _WIN32
|
||||
fprintf(out, "[GearSrc|");
|
||||
|
||||
if(level == GSLogInfo) {
|
||||
fprintf(out, "INFO ");
|
||||
} else if(level == GSLogWarn) {
|
||||
fprintf(out, "WARN ");
|
||||
} else if(level == GSLogError) {
|
||||
fprintf(out, "ERROR");
|
||||
}
|
||||
#else
|
||||
fprintf(out, "[\x1b[mGearSrc\x1b[m|");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue