feat: add SDL App Metadata (#2068)
* add SDL App Metadata * prefix define with LITE
This commit is contained in:
+4
-1
@@ -43,7 +43,10 @@ conf_data.set('PROJECT_ASSEMBLY_VERSION', meson.project_version() + '.0')
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
lite_includes = []
|
||||
lite_cargs = ['-DPCRE2_STATIC']
|
||||
lite_cargs = [
|
||||
'-DPCRE2_STATIC',
|
||||
'-DLITE_PROJECT_VERSION_STR="@0@"'.format(version)
|
||||
]
|
||||
# On macos we need to use the SDL renderer to support retina displays
|
||||
if get_option('renderer') or host_machine.system() == 'darwin'
|
||||
lite_cargs += '-DLITE_USE_SDL_RENDERER'
|
||||
|
||||
@@ -120,6 +120,8 @@ int main(int argc, char **argv) {
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
|
||||
SDL_SetAppMetadata("Lite XL", LITE_PROJECT_VERSION_STR, "com.lite_xl.LiteXL");
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS)) {
|
||||
fprintf(stderr, "Error initializing SDL: %s", SDL_GetError());
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user