mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
------------------------------------------------------------------------
r4173 | acceptthis | 2013-01-17 11:21:20 +0000 (Thu, 17 Jan 2013) | 1 line buildbot doesn't have RegGetString, which is too recent for xp anyway, too. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4171 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
63d5c58871
commit
c0d19c48fb
2 changed files with 22 additions and 14 deletions
|
@ -1978,10 +1978,11 @@ void Win7_TaskListInit(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(SVNREVISION)
|
#if defined(SVNREVISION)
|
||||||
#if defined(OFFICIAL_RELEASE)
|
#if defined(OFFICIAL_RELEASE)
|
||||||
#define BUILDTYPE "dev"
|
#define BUILDTYPE "rel"
|
||||||
|
#else
|
||||||
|
#define BUILDTYPE "test"
|
||||||
#define UPDATE_URL "http://triptohell.info/moodles/"
|
#define UPDATE_URL "http://triptohell.info/moodles/"
|
||||||
#define UPDATE_URL_VERSION UPDATE_URL "version.txt"
|
#define UPDATE_URL_VERSION UPDATE_URL "version.txt"
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
@ -1989,8 +1990,6 @@ void Win7_TaskListInit(void)
|
||||||
#else
|
#else
|
||||||
#define UPDATE_URL_BUILD UPDATE_URL "win32/fte" EXETYPE ".exe"
|
#define UPDATE_URL_BUILD UPDATE_URL "win32/fte" EXETYPE ".exe"
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
#define BUILDTYPE "rel"
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2018,17 +2017,31 @@ void Win7_TaskListInit(void)
|
||||||
void MyRegSetValue(HKEY base, char *keyname, char *valuename, int type, void *data, int datalen)
|
void MyRegSetValue(HKEY base, char *keyname, char *valuename, int type, void *data, int datalen)
|
||||||
{
|
{
|
||||||
HKEY subkey;
|
HKEY subkey;
|
||||||
RegOpenKeyEx(HKEY_CURRENT_USER,keyname, 0, KEY_WRITE, &subkey);
|
RegOpenKeyEx(base, keyname, 0, KEY_WRITE, &subkey);
|
||||||
RegSetValueEx(subkey, valuename, 0, type, data, datalen);
|
RegSetValueEx(subkey, valuename, 0, type, data, datalen);
|
||||||
RegCloseKey (subkey);
|
RegCloseKey (subkey);
|
||||||
}
|
}
|
||||||
void MyRegDeleteKeyValue(HKEY base, char *keyname, char *valuename)
|
void MyRegDeleteKeyValue(HKEY base, char *keyname, char *valuename)
|
||||||
{
|
{
|
||||||
HKEY subkey;
|
HKEY subkey;
|
||||||
RegOpenKeyEx(HKEY_CURRENT_USER,keyname, 0, KEY_WRITE, &subkey);
|
RegOpenKeyEx(base, keyname, 0, KEY_WRITE, &subkey);
|
||||||
RegDeleteValue(subkey, valuename);
|
RegDeleteValue(subkey, valuename);
|
||||||
RegCloseKey (subkey);
|
RegCloseKey (subkey);
|
||||||
}
|
}
|
||||||
|
void MyRegGetStringValue(HKEY base, char *keyname, char *valuename, void *data, int datalen)
|
||||||
|
{
|
||||||
|
DWORD resultlen = datalen - 1;
|
||||||
|
HKEY subkey;
|
||||||
|
DWORD type = REG_NONE;
|
||||||
|
RegOpenKeyEx(base, keyname, 0, KEY_WRITE, &subkey);
|
||||||
|
RegQueryValueEx(subkey, valuename, NULL, &type, data, &datalen);
|
||||||
|
RegCloseKey (subkey);
|
||||||
|
|
||||||
|
if (type == REG_SZ || type == REG_EXPAND_SZ)
|
||||||
|
((char*)data)[datalen] = 0;
|
||||||
|
else
|
||||||
|
((char*)data)[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
qboolean Update_GetHomeDirectory(char *homedir, int homedirsize)
|
qboolean Update_GetHomeDirectory(char *homedir, int homedirsize)
|
||||||
{
|
{
|
||||||
|
@ -2140,7 +2153,6 @@ qboolean Sys_CheckUpdated(void)
|
||||||
{
|
{
|
||||||
char pendingpath[MAX_OSPATH];
|
char pendingpath[MAX_OSPATH];
|
||||||
char updatedpath[MAX_QPATH];
|
char updatedpath[MAX_QPATH];
|
||||||
DWORD bufsz;
|
|
||||||
|
|
||||||
PROCESS_INFORMATION childinfo;
|
PROCESS_INFORMATION childinfo;
|
||||||
STARTUPINFO startinfo;
|
STARTUPINFO startinfo;
|
||||||
|
@ -2149,9 +2161,7 @@ qboolean Sys_CheckUpdated(void)
|
||||||
memset(&startinfo, 0, sizeof(startinfo));
|
memset(&startinfo, 0, sizeof(startinfo));
|
||||||
startinfo.cb = sizeof(startinfo);
|
startinfo.cb = sizeof(startinfo);
|
||||||
|
|
||||||
bufsz = sizeof(pendingpath);
|
MyRegGetStringValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, "pending" BUILDTYPE EXETYPE, pendingpath, sizeof(pendingpath));
|
||||||
*pendingpath = 0;
|
|
||||||
RegGetValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, "pending" BUILDTYPE EXETYPE, RRF_RT_REG_SZ, NULL, pendingpath, &bufsz);
|
|
||||||
if (*pendingpath)
|
if (*pendingpath)
|
||||||
{
|
{
|
||||||
MyRegDeleteKeyValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, "pending" BUILDTYPE EXETYPE);
|
MyRegDeleteKeyValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, "pending" BUILDTYPE EXETYPE);
|
||||||
|
@ -2161,9 +2171,7 @@ qboolean Sys_CheckUpdated(void)
|
||||||
MyRegSetValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, BUILDTYPE EXETYPE, REG_SZ, updatedpath, strlen(updatedpath)+1);
|
MyRegSetValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, BUILDTYPE EXETYPE, REG_SZ, updatedpath, strlen(updatedpath)+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bufsz = sizeof(updatedpath);
|
MyRegGetStringValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, BUILDTYPE EXETYPE, updatedpath, sizeof(updatedpath));
|
||||||
*updatedpath = 0;
|
|
||||||
RegGetValue(HKEY_CURRENT_USER, "Software\\"FULLENGINENAME, BUILDTYPE EXETYPE, RRF_RT_REG_SZ, NULL, updatedpath, &bufsz);
|
|
||||||
|
|
||||||
if (*updatedpath)
|
if (*updatedpath)
|
||||||
{
|
{
|
||||||
|
|
|
@ -382,7 +382,7 @@ void X_SendIntialResponse(xclient_t *cl)
|
||||||
setup->maxKeyCode = 255;
|
setup->maxKeyCode = 255;
|
||||||
|
|
||||||
vendor = (char *)(setup+1);
|
vendor = (char *)(setup+1);
|
||||||
strcpy(vendor, "FTE QuakeWorld X");
|
strcpy(vendor, FULLENGINENAME " X");
|
||||||
setup->nbytesVendor = (strlen(vendor)+3)&~3;
|
setup->nbytesVendor = (strlen(vendor)+3)&~3;
|
||||||
|
|
||||||
pixmapformats = (xPixmapFormat *)(vendor + setup->nbytesVendor);
|
pixmapformats = (xPixmapFormat *)(vendor + setup->nbytesVendor);
|
||||||
|
|
Loading…
Reference in a new issue