Browse Source

Removed a compiler warning on win32, and updated juce_mac_MessageManager.cpp

tags/2021-05-28
jules 17 years ago
parent
commit
3f48d7c085
3 changed files with 17 additions and 7 deletions
  1. +15
    -5
      build/macosx/platform_specific_code/juce_mac_MessageManager.mm
  2. +1
    -1
      build/win32/platform_specific_code/juce_win32_Threads.cpp
  3. +1
    -1
      juce_amalgamated.cpp

+ 15
- 5
build/macosx/platform_specific_code/juce_mac_MessageManager.mm View File

@@ -217,12 +217,19 @@ using namespace JUCE_NAMESPACE;
- (void) performCallback: (id) info
{
CallbackMessagePayload* pl = (CallbackMessagePayload*) info;
if ([info isKindOfClass: [NSData class]])
{
CallbackMessagePayload* pl = (CallbackMessagePayload*) [((NSData*) info) bytes];
if (pl != 0)
if (pl != 0)
{
pl->result = (*pl->function) (pl->parameter);
pl->hasBeenExecuted = true;
}
}
else
{
pl->result = (*pl->function) (pl->parameter);
pl->hasBeenExecuted = true;
jassertfalse // should never get here!
}
}
@@ -322,6 +329,8 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* call
}
else
{
const ScopedAutoReleasePool pool;
CallbackMessagePayload cmp;
cmp.function = callback;
cmp.parameter = data;
@@ -329,7 +338,8 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* call
cmp.hasBeenExecuted = false;
[juceAppDelegate performSelectorOnMainThread: @selector (performCallback:)
withObject: (id) &cmp
withObject: [NSData dataWithBytesNoCopy: &cmp
length: sizeof (cmp)]
waitUntilDone: YES];
return cmp.result;


+ 1
- 1
build/win32/platform_specific_code/juce_win32_Threads.cpp View File

@@ -170,7 +170,7 @@ void juce_setCurrentThreadName (const String& name) throw()
Thread::ThreadID Thread::getCurrentThreadId() throw()
{
return (ThreadID) GetCurrentThreadId();
return (ThreadID) (pointer_sized_int) GetCurrentThreadId();
}
// priority 1 to 10 where 5=normal, 1=low


+ 1
- 1
juce_amalgamated.cpp View File

@@ -239382,7 +239382,7 @@ void juce_setCurrentThreadName (const String& name) throw()

Thread::ThreadID Thread::getCurrentThreadId() throw()
{
return (ThreadID) GetCurrentThreadId();
return (ThreadID) (pointer_sized_int) GetCurrentThreadId();
}

// priority 1 to 10 where 5=normal, 1=low


Loading…
Cancel
Save