diff --git a/templates/lv2/src/lv2.c b/templates/lv2/src/lv2.c index 1a197d0..bd3263d 100644 --- a/templates/lv2/src/lv2.c +++ b/templates/lv2/src/lv2.c @@ -551,6 +551,9 @@ LV2_SYMBOL_EXPORT const LV2_Descriptor * lv2_descriptor(uint32_t index) { #elif defined(__APPLE__) # include # include +#else +# include +# include #endif typedef struct { @@ -583,6 +586,16 @@ static const char * ui_get_hostinfo(void *handle) { } instance->processname[127] = 0; return instance->processname; +#else + ui_instance *instance = (ui_instance *)handle; + HANDLE process_handle = GetCurrentProcess(); + if (GetModuleBaseNameA(process_handle, NULL, instance->processname, 128) == 0) { + CloseHandle(process_handle); + return NULL; + } + CloseHandle(process_handle); + instance->processname[127] = 0; + return instance->processname; #endif }