mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-26 07:14:33 +08:00
[fix] prevent Windows startup crashes from OpenGL failures, fixes #97
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* @Author: DI JUNKUN
|
||||
* @Date: 2026-09-07
|
||||
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SLINT_BACKEND_H_
|
||||
#define _SLINT_BACKEND_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace crossdesk {
|
||||
|
||||
struct SlintBackendSelection {
|
||||
bool success = true;
|
||||
std::string backend;
|
||||
std::string diagnostic;
|
||||
};
|
||||
|
||||
inline constexpr char kSlintRendererProbeArgument[] = "--slint-renderer-probe";
|
||||
|
||||
// Call before creating any Slint components. The executable's main() must
|
||||
// dispatch kSlintRendererProbeArgument before services, settings or the daemon.
|
||||
SlintBackendSelection ConfigureWindowsSlintBackend(
|
||||
uint32_t probe_timeout_ms = 10000);
|
||||
|
||||
// Internal child-process entry point; never call in the main application.
|
||||
int RunSlintRendererProbe();
|
||||
|
||||
} // namespace crossdesk
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user