mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
Launcher: If downloading a resource fails, then cancel all subsequent pending resources
macOS: Fix on cocoa backend, total video memory and HW acceleration status wasn't being shown on /client gpu on macOS 10.4 and later
This commit is contained in:
parent
f9c898f859
commit
aa2c0f4b9f
@ -1109,6 +1109,14 @@ static void Fetcher_Finish(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Fetcher_Fail(struct HttpRequest* item) {
|
||||||
|
Http_ClearPending();
|
||||||
|
|
||||||
|
/* Only show error for first failed download */
|
||||||
|
if (!Fetcher_Failed) Fetcher_ErrorCallback(item);
|
||||||
|
Fetcher_Failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
CC_NOINLINE static cc_bool Fetcher_Get(int reqID, struct HttpRequest* item) {
|
CC_NOINLINE static cc_bool Fetcher_Get(int reqID, struct HttpRequest* item) {
|
||||||
if (!Http_GetResult(reqID, item)) return false;
|
if (!Http_GetResult(reqID, item)) return false;
|
||||||
|
|
||||||
@ -1117,9 +1125,7 @@ CC_NOINLINE static cc_bool Fetcher_Get(int reqID, struct HttpRequest* item) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only show error for first failed download */
|
Fetcher_Fail(item);
|
||||||
if (!Fetcher_Failed) Fetcher_ErrorCallback(item);
|
|
||||||
Fetcher_Failed = true;
|
|
||||||
HttpRequest_Free(item);
|
HttpRequest_Free(item);
|
||||||
|
|
||||||
Fetcher_Finish();
|
Fetcher_Finish();
|
||||||
|
@ -774,8 +774,8 @@ void GLContext_SetFpsLimit(cc_bool vsync, float minFrameMs) {
|
|||||||
[ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval];
|
[ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* kCGLCPCurrentRendererID is only defined on macOS 10.4 and later */
|
/* kCGLCPCurrentRendererID is only available on macOS 10.4 and later */
|
||||||
#ifdef kCGLCPCurrentRendererID
|
#if defined MAC_OS_X_VERSION_10_4
|
||||||
static const char* GetAccelerationMode(CGLContextObj ctx) {
|
static const char* GetAccelerationMode(CGLContextObj ctx) {
|
||||||
GLint fGPU, vGPU;
|
GLint fGPU, vGPU;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user