Browse Source

Tweaks to Windows usage, now runs

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 1 year ago
parent
commit
558a5d0804
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 20 additions and 8 deletions
  1. +1
    -1
      dpf
  2. +13
    -1
      plugins/ProM/DistrhoUIProM.cpp
  3. +6
    -6
      plugins/ProM/Makefile

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit ed1275997091c51c539c75ae00709912f6a044af
Subproject commit 7ddda017a03653d13e8fe13fa94a9eae626b2c86

+ 13
- 1
plugins/ProM/DistrhoUIProM.cpp View File

@@ -23,6 +23,18 @@
# include <dlfcn.h>
#endif

#ifdef DISTRHO_OS_WINDOWS
static HINSTANCE hInstance = nullptr;

DISTRHO_PLUGIN_EXPORT
BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
hInstance = hInst;
return 1;
}
#endif

START_NAMESPACE_DISTRHO

// -----------------------------------------------------------------------
@@ -37,7 +49,7 @@ static String getCurrentExecutableDataDir()
#ifdef DISTRHO_OS_WINDOWS
CHAR filename[MAX_PATH + 256];
filename[0] = '\0';
GetModuleFileName(nullptr, filename, sizeof(filename));
GetModuleFileName(hInstance, filename, sizeof(filename));

datadir = String(filename);
datadir.truncate(datadir.rfind('\\'));


+ 6
- 6
plugins/ProM/Makefile View File

@@ -119,10 +119,8 @@ LINK_FLAGS += $(shell pkg-config --libs libprojectM)
else # HAVE_PROJECTM

# compiler macros
BASE_FLAGS += -DHAVE_ALIGNED_ALLOC=1
BASE_FLAGS += -DHAVE_POSIX_MEMALIGN=1
BASE_FLAGS += -DUSE_TEXT_MENU
BASE_FLAGS += -DUSE_THREADS
BASE_FLAGS += -DUSE_TEXT_MENU=1
BASE_FLAGS += -DUSE_THREADS=1
# GLES stuff
# BASE_FLAGS += -DUSE_GLES=1
# Experimental
@@ -132,10 +130,12 @@ BASE_FLAGS += -Daligned_alloc=_aligned_malloc
BASE_FLAGS += -DDLLEXPORT=
BASE_FLAGS += -DprojectM_FONT_TITLE='"fonts/Vera.tff"'
BASE_FLAGS += -DprojectM_FONT_MENU='"fonts/VeraMono.ttf"'
BASE_FLAGS += -DSTBI_NO_DDS
BASE_FLAGS += -DSTBI_NO_DDS=1
else # WINDOWS
BASE_FLAGS += -DDATADIR_PATH='"."'
BASE_FLAGS += -DHAVE_FTS_H
BASE_FLAGS += -DHAVE_ALIGNED_ALLOC=1
BASE_FLAGS += -DHAVE_FTS_H=1
BASE_FLAGS += -DHAVE_POSIX_MEMALIGN=1
endif # WINDOWS

# include dirs


Loading…
Cancel
Save