MSVC DEBUG! MSVC DEBUG! MSVC DEBUG!
DO NOT USE! I AM DEBUGGING A CRASH! ONLY FOR TESTER
This commit is contained in:
parent
39349d2fde
commit
0d5c7da774
|
@ -11,20 +11,20 @@ defaults:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Debug
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- { name: 'Windows MSVC x86', os: windows-latest, compiler: msvc, arch: x86 }
|
#- { name: 'Windows MSVC x86', os: windows-latest, compiler: msvc, arch: x86 }
|
||||||
- { name: 'Windows MSVC x86_64', os: windows-latest, compiler: msvc, arch: x86_64 }
|
- { name: 'Windows MSVC x86_64', os: windows-latest, compiler: msvc, arch: x86_64 }
|
||||||
- { name: 'Windows MinGW x86', os: ubuntu-20.04, compiler: mingw, arch: x86 }
|
#- { name: 'Windows MinGW x86', os: ubuntu-20.04, compiler: mingw, arch: x86 }
|
||||||
- { name: 'Windows MinGW x86_64', os: ubuntu-20.04, compiler: mingw, arch: x86_64 }
|
#- { name: 'Windows MinGW x86_64', os: ubuntu-20.04, compiler: mingw, arch: x86_64 }
|
||||||
- { name: 'macOS x86_64', os: macos-latest, arch: x86_64 }
|
#- { name: 'macOS x86_64', os: macos-latest, arch: x86_64 }
|
||||||
- { name: 'macOS ARM', os: macos-latest, arch: arm64 }
|
#- { name: 'macOS ARM', os: macos-latest, arch: arm64 }
|
||||||
- { name: 'Linux x86_64', os: ubuntu-18.04, arch: x86_64 }
|
#- { name: 'Linux x86_64', os: ubuntu-18.04, arch: x86_64 }
|
||||||
#- { name: 'Linux ARM', os: ubuntu-18.04, arch: armhf }
|
#- { name: 'Linux ARM', os: ubuntu-18.04, arch: armhf }
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
// hack I know
|
// hack I know
|
||||||
#include "../../../src/utfutils.h"
|
#include "../../../src/utfutils.h"
|
||||||
|
|
||||||
|
// hack 2...
|
||||||
|
#include "../../../src/ta-log.h"
|
||||||
|
|
||||||
class NFDWinEvents: public IFileDialogEvents {
|
class NFDWinEvents: public IFileDialogEvents {
|
||||||
nfdselcallback_t selCallback;
|
nfdselcallback_t selCallback;
|
||||||
size_t refCount;
|
size_t refCount;
|
||||||
|
@ -38,21 +41,21 @@ class NFDWinEvents: public IFileDialogEvents {
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) {
|
IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) {
|
||||||
printf("QueryInterface called DAMN IT\n");
|
logV("%p: QueryInterface called DAMN IT",(const void*)this);
|
||||||
*ppv=NULL;
|
*ppv=NULL;
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
IFACEMETHODIMP_(ULONG) AddRef() {
|
IFACEMETHODIMP_(ULONG) AddRef() {
|
||||||
printf("AddRef() called\n");
|
logV("%p: AddRef() called",(const void*)this);
|
||||||
return InterlockedIncrement(&refCount);
|
return InterlockedIncrement(&refCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
IFACEMETHODIMP_(ULONG) Release() {
|
IFACEMETHODIMP_(ULONG) Release() {
|
||||||
printf("Release() called\n");
|
logV("%p: Release() called",(const void*)this);
|
||||||
LONG ret=InterlockedDecrement(&refCount);
|
LONG ret=InterlockedDecrement(&refCount);
|
||||||
if (ret==0) {
|
if (ret==0) {
|
||||||
printf("Destroying the final object.\n");
|
logV("%p: Destroying the final object.",(const void*)this);
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -67,30 +70,40 @@ class NFDWinEvents: public IFileDialogEvents {
|
||||||
|
|
||||||
IFACEMETHODIMP OnSelectionChange(IFileDialog* dialog) {
|
IFACEMETHODIMP OnSelectionChange(IFileDialog* dialog) {
|
||||||
// Get the file name
|
// Get the file name
|
||||||
|
logV("%p: OnSelectionChange() called",(const void*)this);
|
||||||
::IShellItem *shellItem(NULL);
|
::IShellItem *shellItem(NULL);
|
||||||
|
logV("%p: GetCurrentSelection",(const void*)this);
|
||||||
HRESULT result = dialog->GetCurrentSelection(&shellItem);
|
HRESULT result = dialog->GetCurrentSelection(&shellItem);
|
||||||
if ( !SUCCEEDED(result) )
|
if ( !SUCCEEDED(result) )
|
||||||
{
|
{
|
||||||
printf("failure!\n");
|
logV("%p: failure!",(const void*)this);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
wchar_t *filePath(NULL);
|
wchar_t *filePath(NULL);
|
||||||
result = shellItem->GetDisplayName(::SIGDN_FILESYSPATH, &filePath);
|
result = shellItem->GetDisplayName(::SIGDN_FILESYSPATH, &filePath);
|
||||||
if ( !SUCCEEDED(result) )
|
if ( !SUCCEEDED(result) )
|
||||||
{
|
{
|
||||||
printf("GDN failure!\n");
|
logV("%p: GDN failure!",(const void*)this);
|
||||||
shellItem->Release();
|
shellItem->Release();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
std::string utf8FilePath=utf16To8(filePath);
|
std::string utf8FilePath=utf16To8(filePath);
|
||||||
if (selCallback!=NULL) selCallback(utf8FilePath.c_str());
|
if (selCallback!=NULL) {
|
||||||
printf("I got you for a value of %s\n",utf8FilePath.c_str());
|
logV("%p: calling back.",(const void*)this);
|
||||||
|
selCallback(utf8FilePath.c_str());
|
||||||
|
logV("%p: end of callback",(const void*)this);
|
||||||
|
} else {
|
||||||
|
logV("%p: no callback.",(const void*)this);
|
||||||
|
}
|
||||||
|
logV("%p: I got you for a value of %s",(const void*)this,utf8FilePath.c_str());
|
||||||
shellItem->Release();
|
shellItem->Release();
|
||||||
|
logV("%p: shellItem->Release()",(const void*)this);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
NFDWinEvents(nfdselcallback_t callback):
|
NFDWinEvents(nfdselcallback_t callback):
|
||||||
selCallback(callback),
|
selCallback(callback),
|
||||||
refCount(1) {
|
refCount(1) {
|
||||||
|
logV("%p: CONSTRUCT!",(const void*)this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ bool TAMidiInRtMidi::gather() {
|
||||||
if (m.type!=TA_MIDI_SYSEX && msg.size()>1) {
|
if (m.type!=TA_MIDI_SYSEX && msg.size()>1) {
|
||||||
memcpy(m.data,msg.data()+1,MIN(msg.size()-1,7));
|
memcpy(m.data,msg.data()+1,MIN(msg.size()-1,7));
|
||||||
} else if (m.type==TA_MIDI_SYSEX) {
|
} else if (m.type==TA_MIDI_SYSEX) {
|
||||||
m.sysExData.reset(new unsigned char[msg.size()]);
|
m.sysExData=std::shared_ptr<unsigned char>(new unsigned char[msg.size()],std::default_delete<unsigned char[]>());
|
||||||
m.sysExLen=msg.size();
|
m.sysExLen=msg.size();
|
||||||
logD("got a SysEx of length %ld!",msg.size());
|
logD("got a SysEx of length %ld!",msg.size());
|
||||||
memcpy(m.sysExData.get(),msg.data(),msg.size());
|
memcpy(m.sysExData.get(),msg.data(),msg.size());
|
||||||
|
|
|
@ -163,7 +163,7 @@ void FurnaceGUI::doAction(int what) {
|
||||||
case GUI_ACTION_TX81Z_REQUEST: {
|
case GUI_ACTION_TX81Z_REQUEST: {
|
||||||
TAMidiMessage msg;
|
TAMidiMessage msg;
|
||||||
msg.type=TA_MIDI_SYSEX;
|
msg.type=TA_MIDI_SYSEX;
|
||||||
msg.sysExData.reset(new unsigned char[15]);
|
msg.sysExData.reset(new unsigned char[15],std::default_delete<unsigned char[]>());
|
||||||
msg.sysExLen=15;
|
msg.sysExLen=15;
|
||||||
memcpy(msg.sysExData.get(),avRequest,15);
|
memcpy(msg.sysExData.get(),avRequest,15);
|
||||||
if (!e->sendMidiMessage(msg)) {
|
if (!e->sendMidiMessage(msg)) {
|
||||||
|
|
Loading…
Reference in New Issue