Don't even show the Direct3D9 buttons or 'direct3d9 is recommended' on macOS/linux in launcher updates menu

This commit is contained in:
UnknownShadow200 2020-02-01 21:17:24 +11:00
parent 970e8bbda7
commit fee0e5f8f7
2 changed files with 21 additions and 24 deletions

View File

@ -1514,17 +1514,21 @@ static void UpdatesScreen_Init(struct LScreen* s_) {
LLine_Init(s_, &s->seps[1], 320);
LLabel_Init(s_, &s->lblRel, "Latest release: Checking..");
LButton_Init(s_, &s->btnRel[0], 130, 35, "Direct3D 9");
LButton_Init(s_, &s->btnRel[1], 130, 35, "OpenGL");
LLabel_Init(s_, &s->lblDev, "Latest dev build: Checking..");
LButton_Init(s_, &s->btnDev[0], 130, 35, "Direct3D 9");
LButton_Init(s_, &s->btnDev[1], 130, 35, "OpenGL");
LLabel_Init(s_, &s->lblInfo, "&eDirect3D 9 is recommended for Windows");
LLabel_Init(s_, &s->lblStatus, "");
LButton_Init(s_, &s->btnBack, 80, 35, "Back");
if (Updater_D3D9) {
LButton_Init(s_, &s->btnRel[0], 130, 35, "Direct3D 9");
LButton_Init(s_, &s->btnDev[0], 130, 35, "Direct3D 9");
LLabel_Init(s_, &s->lblInfo, "&eDirect3D 9 is recommended");
}
if (Updater_OGL) {
LButton_Init(s_, &s->btnRel[1], 130, 35, "OpenGL");
LButton_Init(s_, &s->btnDev[1], 130, 35, "OpenGL");
}
s->btnRel[0].OnClick = UpdatesScreen_RelD3D9;
s->btnRel[1].OnClick = UpdatesScreen_RelOpenGL;
s->btnDev[0].OnClick = UpdatesScreen_DevD3D9;

View File

@ -1329,34 +1329,27 @@ cc_result Updater_GetBuildTime(TimeMS* time) { return ERR_NOT_SUPPORTED; }
#elif defined CC_BUILD_POSIX
cc_bool Updater_Clean(void) { return true; }
const char* Updater_D3D9 = NULL;
#if defined CC_BUILD_LINUX
#if __x86_64__
const char* Updater_D3D9 = "ClassiCube";
const char* Updater_OGL = "ClassiCube";
const char* Updater_OGL = "ClassiCube";
#elif __i386__
const char* Updater_D3D9 = "ClassiCube.32";
const char* Updater_OGL = "ClassiCube.32";
const char* Updater_OGL = "ClassiCube.32";
#elif CC_BUILD_RPI
const char* Updater_D3D9 = "ClassiCube.rpi";
const char* Updater_OGL = "ClassiCube.rpi";
const char* Updater_OGL = "ClassiCube.rpi";
#else
const char* Updater_D3D9 = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
#endif
#elif defined CC_BUILD_OSX
#if __x86_64__
const char* Updater_D3D9 = "ClassiCube.64.osx";
const char* Updater_OGL = "ClassiCube.64.osx";
const char* Updater_OGL = "ClassiCube.64.osx";
#elif __i386__
const char* Updater_D3D9 = "ClassiCube.osx";
const char* Updater_OGL = "ClassiCube.osx";
const char* Updater_OGL = "ClassiCube.osx";
#else
const char* Updater_D3D9 = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
#endif
#else
const char* Updater_D3D9 = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
const char* Updater_OGL = "ClassiCube.unknown";
#endif
cc_result Updater_Start(void) {