Browse Source

Add build fix for wine without unicode, disabled by default

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0.0
falkTX 1 year ago
parent
commit
380d8be3a4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      asio.c

+ 12
- 0
asio.c View File

@@ -43,7 +43,9 @@
#include "objbase.h"
#include "mmsystem.h"
#include "winreg.h"
#ifndef WINE_NO_UNICODE
#include "wine/unicode.h"
#endif

#include <jack/jack.h>
#include <jack/thread.h>
@@ -1432,6 +1434,16 @@ static int srate_callback(jack_nframes_t nframes, void *arg)
* Support functions
*/

#ifdef WINE_NO_UNICODE
/* Funtion required as unicode.h no longer in WINE */
static WCHAR *strrchrW(const WCHAR* str, WCHAR ch)
{
WCHAR *ret = NULL;
do { if (*str == ch) ret = (WCHAR *)(ULONG_PTR)str; } while (*str++);
return ret;
}
#endif

/* Function called by JACK to create a thread in the wine process context,
* uses the global structure jack_thread_creator_privates to communicate with jack_thread_creator_helper() */
static int jack_thread_creator(pthread_t* thread_id, const pthread_attr_t* attr, void *(*function)(void*), void* arg)


Loading…
Cancel
Save