steam: fix ems build
parent
4fd3e9cd67
commit
dd7003b276
2
MAKE.bat
2
MAKE.bat
|
@ -166,6 +166,8 @@ rem move /y 3rd_*.? engine\split\
|
||||||
git add engine/split
|
git add engine/split
|
||||||
git add engine/joint
|
git add engine/joint
|
||||||
git add engine/v4k
|
git add engine/v4k
|
||||||
|
git add engine/v4k.*
|
||||||
|
git add MAKE.bat
|
||||||
git add bind/v4k.lua
|
git add bind/v4k.lua
|
||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|
|
@ -377030,11 +377030,13 @@ bool steam_init(unsigned app_id) {
|
||||||
app_id = app_id ? app_id : STEAM_APPID;
|
app_id = app_id ? app_id : STEAM_APPID;
|
||||||
|
|
||||||
// Steam installed?
|
// Steam installed?
|
||||||
|
#if is(win32)
|
||||||
HKEY hSteamProcess;
|
HKEY hSteamProcess;
|
||||||
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
||||||
return !strcpy(steam.status, "Err: steam not installed");
|
return !strcpy(steam.status, "Err: steam not installed");
|
||||||
}
|
}
|
||||||
RegCloseKey(hSteamProcess);
|
RegCloseKey(hSteamProcess);
|
||||||
|
#endif
|
||||||
|
|
||||||
// dll present?
|
// dll present?
|
||||||
if( !file_exist(STEAM_DLL) ) {
|
if( !file_exist(STEAM_DLL) ) {
|
||||||
|
@ -377048,7 +377050,9 @@ bool steam_init(unsigned app_id) {
|
||||||
// Initialize
|
// Initialize
|
||||||
char *app_id_str = va("%d", app_id);
|
char *app_id_str = va("%d", app_id);
|
||||||
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
||||||
|
#if is(win32)
|
||||||
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
||||||
|
#endif
|
||||||
|
|
||||||
int started = SteamAPI_Init && SteamAPI_Init();
|
int started = SteamAPI_Init && SteamAPI_Init();
|
||||||
if( !started ) {
|
if( !started ) {
|
||||||
|
@ -379184,7 +379188,7 @@ static char title[128] = {0};
|
||||||
static char screenshot_file[DIR_MAX];
|
static char screenshot_file[DIR_MAX];
|
||||||
static int locked_aspect_ratio = 0;
|
static int locked_aspect_ratio = 0;
|
||||||
static vec4 winbgcolor = {0,0,0,1};
|
static vec4 winbgcolor = {0,0,0,1};
|
||||||
static bool debug_visible = true;
|
static bool win_debug_visible = true;
|
||||||
|
|
||||||
vec4 window_getcolor_() { return winbgcolor; } // internal
|
vec4 window_getcolor_() { return winbgcolor; } // internal
|
||||||
|
|
||||||
|
@ -379613,7 +379617,7 @@ int window_frame_begin() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!debug_visible)
|
if (!win_debug_visible)
|
||||||
may_render_debug_panel = 0;
|
may_render_debug_panel = 0;
|
||||||
|
|
||||||
// generate Debug panel contents
|
// generate Debug panel contents
|
||||||
|
@ -379826,7 +379830,7 @@ double window_delta() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void window_debug(bool visible) {
|
void window_debug(bool visible) {
|
||||||
debug_visible = visible;
|
win_debug_visible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
|
|
|
@ -63,11 +63,13 @@ bool steam_init(unsigned app_id) {
|
||||||
app_id = app_id ? app_id : STEAM_APPID;
|
app_id = app_id ? app_id : STEAM_APPID;
|
||||||
|
|
||||||
// Steam installed?
|
// Steam installed?
|
||||||
|
#if is(win32)
|
||||||
HKEY hSteamProcess;
|
HKEY hSteamProcess;
|
||||||
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
||||||
return !strcpy(steam.status, "Err: steam not installed");
|
return !strcpy(steam.status, "Err: steam not installed");
|
||||||
}
|
}
|
||||||
RegCloseKey(hSteamProcess);
|
RegCloseKey(hSteamProcess);
|
||||||
|
#endif
|
||||||
|
|
||||||
// dll present?
|
// dll present?
|
||||||
if( !file_exist(STEAM_DLL) ) {
|
if( !file_exist(STEAM_DLL) ) {
|
||||||
|
@ -81,7 +83,9 @@ bool steam_init(unsigned app_id) {
|
||||||
// Initialize
|
// Initialize
|
||||||
char *app_id_str = va("%d", app_id);
|
char *app_id_str = va("%d", app_id);
|
||||||
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
||||||
|
#if is(win32)
|
||||||
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
||||||
|
#endif
|
||||||
|
|
||||||
int started = SteamAPI_Init && SteamAPI_Init();
|
int started = SteamAPI_Init && SteamAPI_Init();
|
||||||
if( !started ) {
|
if( !started ) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ static char title[128] = {0};
|
||||||
static char screenshot_file[DIR_MAX];
|
static char screenshot_file[DIR_MAX];
|
||||||
static int locked_aspect_ratio = 0;
|
static int locked_aspect_ratio = 0;
|
||||||
static vec4 winbgcolor = {0,0,0,1};
|
static vec4 winbgcolor = {0,0,0,1};
|
||||||
static bool debug_visible = true;
|
static bool win_debug_visible = true;
|
||||||
|
|
||||||
vec4 window_getcolor_() { return winbgcolor; } // internal
|
vec4 window_getcolor_() { return winbgcolor; } // internal
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ int window_frame_begin() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!debug_visible)
|
if (!win_debug_visible)
|
||||||
may_render_debug_panel = 0;
|
may_render_debug_panel = 0;
|
||||||
|
|
||||||
// generate Debug panel contents
|
// generate Debug panel contents
|
||||||
|
@ -751,7 +751,7 @@ double window_delta() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void window_debug(bool visible) {
|
void window_debug(bool visible) {
|
||||||
debug_visible = visible;
|
win_debug_visible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
|
|
10
engine/v4k.c
10
engine/v4k.c
|
@ -24174,11 +24174,13 @@ bool steam_init(unsigned app_id) {
|
||||||
app_id = app_id ? app_id : STEAM_APPID;
|
app_id = app_id ? app_id : STEAM_APPID;
|
||||||
|
|
||||||
// Steam installed?
|
// Steam installed?
|
||||||
|
#if is(win32)
|
||||||
HKEY hSteamProcess;
|
HKEY hSteamProcess;
|
||||||
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
if( RegOpenKeyExA(HKEY_CURRENT_USER,"Software\\Valve\\Steam\\ActiveProcess", 0, KEY_READ, &hSteamProcess) ) {
|
||||||
return !strcpy(steam.status, "Err: steam not installed");
|
return !strcpy(steam.status, "Err: steam not installed");
|
||||||
}
|
}
|
||||||
RegCloseKey(hSteamProcess);
|
RegCloseKey(hSteamProcess);
|
||||||
|
#endif
|
||||||
|
|
||||||
// dll present?
|
// dll present?
|
||||||
if( !file_exist(STEAM_DLL) ) {
|
if( !file_exist(STEAM_DLL) ) {
|
||||||
|
@ -24192,7 +24194,9 @@ bool steam_init(unsigned app_id) {
|
||||||
// Initialize
|
// Initialize
|
||||||
char *app_id_str = va("%d", app_id);
|
char *app_id_str = va("%d", app_id);
|
||||||
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
//if( !file_exist("steam_appid.txt") ) file_write("steam_appid.txt", app_id_str, strlen(app_id_str));
|
||||||
|
#if is(win32)
|
||||||
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
if( !getenv("SteamAppId") ) SetEnvironmentVariableA("SteamAppId", app_id_str);
|
||||||
|
#endif
|
||||||
|
|
||||||
int started = SteamAPI_Init && SteamAPI_Init();
|
int started = SteamAPI_Init && SteamAPI_Init();
|
||||||
if( !started ) {
|
if( !started ) {
|
||||||
|
@ -26328,7 +26332,7 @@ static char title[128] = {0};
|
||||||
static char screenshot_file[DIR_MAX];
|
static char screenshot_file[DIR_MAX];
|
||||||
static int locked_aspect_ratio = 0;
|
static int locked_aspect_ratio = 0;
|
||||||
static vec4 winbgcolor = {0,0,0,1};
|
static vec4 winbgcolor = {0,0,0,1};
|
||||||
static bool debug_visible = true;
|
static bool win_debug_visible = true;
|
||||||
|
|
||||||
vec4 window_getcolor_() { return winbgcolor; } // internal
|
vec4 window_getcolor_() { return winbgcolor; } // internal
|
||||||
|
|
||||||
|
@ -26757,7 +26761,7 @@ int window_frame_begin() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!debug_visible)
|
if (!win_debug_visible)
|
||||||
may_render_debug_panel = 0;
|
may_render_debug_panel = 0;
|
||||||
|
|
||||||
// generate Debug panel contents
|
// generate Debug panel contents
|
||||||
|
@ -26970,7 +26974,7 @@ double window_delta() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void window_debug(bool visible) {
|
void window_debug(bool visible) {
|
||||||
debug_visible = visible;
|
win_debug_visible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
|
|
Loading…
Reference in New Issue