Skip to content

Commit

Permalink
Merge branch 'hotfix/uninitialized-keymap'
Browse files Browse the repository at this point in the history
  • Loading branch information
rsjaffe committed Jan 5, 2020
2 parents 247c6dd + 1024f3c commit 1015887
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Builds/MacOSX/Info-App.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>3.4.8.0</string>
<string>3.4.9.1</string>
<key>CFBundleVersion</key>
<string>3.4.8.0</string>
<string>3.4.9.1</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSHighResolutionCapable</key>
Expand Down
8 changes: 4 additions & 4 deletions Builds/MacOSX/MIDI2LR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1029,8 +1029,8 @@
"DONT_SET_USING_JUCE_NAMESPACE=1",
"GSL_THROW_ON_CONTRACT_VIOLATION=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=3.4.8.0",
"JUCE_APP_VERSION_HEX=0x3040800",
"JUCE_APP_VERSION=3.4.9.1",
"JUCE_APP_VERSION_HEX=0x3040901",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
Expand Down Expand Up @@ -1082,8 +1082,8 @@
"DONT_SET_USING_JUCE_NAMESPACE=1",
"GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=3.4.8.0",
"JUCE_APP_VERSION_HEX=0x3040800",
"JUCE_APP_VERSION=3.4.9.1",
"JUCE_APP_VERSION_HEX=0x3040901",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
Expand Down
4 changes: 2 additions & 2 deletions Builds/VisualStudio2019/MIDI2LR_App.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;../../;../../asio/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;DONT_SET_USING_JUCE_NAMESPACE=1;GSL_THROW_ON_CONTRACT_VIOLATION=1;_WIN32_WINNT=0x0601;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=3.4.8.0;JUCE_APP_VERSION_HEX=0x3040800;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;DONT_SET_USING_JUCE_NAMESPACE=1;GSL_THROW_ON_CONTRACT_VIOLATION=1;_WIN32_WINNT=0x0601;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=3.4.9.1;JUCE_APP_VERSION_HEX=0x3040901;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down Expand Up @@ -106,7 +106,7 @@
<ClCompile>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;../../;../../asio/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;DONT_SET_USING_JUCE_NAMESPACE=1;GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1;_WIN32_WINNT=0x0601;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=3.4.8.0;JUCE_APP_VERSION_HEX=0x3040800;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;DONT_SET_USING_JUCE_NAMESPACE=1;GSL_UNENFORCED_ON_CONTRACT_VIOLATION=1;_WIN32_WINNT=0x0601;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=3.4.9.1;JUCE_APP_VERSION_HEX=0x3040901;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader/>
Expand Down
6 changes: 3 additions & 3 deletions Builds/VisualStudio2019/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#include <windows.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,4,8,0
FILEVERSION 3,4,9,1
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "MIDI2LR\0"
VALUE "FileVersion", "3.4.8.0\0"
VALUE "FileVersion", "3.4.9.1\0"
VALUE "ProductName", "MIDI2LR\0"
VALUE "ProductVersion", "3.4.8.0\0"
VALUE "ProductVersion", "3.4.9.1\0"
END
END

Expand Down
2 changes: 1 addition & 1 deletion DoxyGen/Midi2lr.Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = MIDI2LR
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.4.8.0
PROJECT_NUMBER = 3.4.9.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Installer/MIDI2LR.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project>
<shortName>MIDI2LR</shortName>
<fullName>MIDI2LR</fullName>
<version>3.4.8.0</version>
<version>3.4.9.1</version>
<installerFilename>${product_shortname}-${product_version}-${debuglabel}${platform_name}-installer.${platform_exec_suffix}</installerFilename>
<readmeFile>../Source/LRPlugin/ReadMe.txt</readmeFile>
<licenseFile>../LICENSE.txt</licenseFile>
Expand Down
4 changes: 2 additions & 2 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace ProjectInfo
{
const char* const projectName = "MIDI2LR";
const char* const companyName = "";
const char* const versionString = "3.4.8.0";
const int versionNumber = 0x3040800;
const char* const versionString = "3.4.9.1";
const int versionNumber = 0x3040901;
}
#endif
2 changes: 1 addition & 1 deletion MIDI2LR.jucer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="3.4.8.0"
<JUCERPROJECT id="jqaeel" name="MIDI2LR" projectType="guiapp" version="3.4.9.1"
bundleIdentifier="com.rsjaffe.MIDI2LR" includeBinaryInAppConfig="1"
jucerVersion="5.4.5" companyWebsite="http://rsjaffe.github.io/MIDI2LR/"
companyEmail="[email protected]" displaySplashScreen="0" reportAppUsage="0"
Expand Down
8 changes: 7 additions & 1 deletion Source/DebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,21 @@ std::string rsj::GetKeyboardLayout()
throw;
}
}
#else
#include "Ocpp.h"
#endif

#pragma warning(push)
#pragma warning(disable : 26447) /* all exceptions suppressed by catch blocks */
DebugInfo::DebugInfo(const juce::String& profile_directory) noexcept
{
try {
#ifndef _WIN32
if (!juce::MessageManager::callAsync(rsj::FillInMessageLoop))
rsj::Log("Unable to post FillInMessageLoop to message queue.");
#endif
LogAndSave(fmt::format("Application: System language {}.",
juce::SystemStats::getDisplayLanguage().toStdString()));
LogAndSave(fmt::format("Application: Keyboard type {}.", rsj::GetKeyboardLayout()));
// ReSharper disable CppUnreachableCode
if constexpr (kNdebug) {
LogAndSave(
Expand All @@ -184,6 +189,7 @@ DebugInfo::DebugInfo(const juce::String& profile_directory) noexcept
LogAndSave(fmt::format("Application: Log file directory {}.", rsj::AppLogFilePath("")));
LogAndSave(fmt::format("Application: Settings file directory {}.", rsj::AppDataFilePath("")));
#endif
LogAndSave(fmt::format("Application: Keyboard type {}.", rsj::GetKeyboardLayout()));
}
catch (...) {
try {
Expand Down
6 changes: 6 additions & 0 deletions Source/KeyMap.mm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@
CFRelease(source);
}

bool rsj::FillInSucceeded()
{
std::shared_lock lock(mtx);
return !KeyMapA.empty();
}

std::unordered_map<UniChar, std::pair<size_t, bool>> rsj::GetKeyMap()
{
std::shared_lock lock(mtx);
Expand Down
2 changes: 1 addition & 1 deletion Source/LRPlugin/MIDI2LR.lrplugin/Info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ return {
file = "About.lua",
},
},
VERSION = { major=3, minor=4, revision=8, build=0}
VERSION = { major=3, minor=4, revision=9, build=1}
}
5 changes: 0 additions & 5 deletions Source/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ namespace fs = std::filesystem;
#include "MIDIReceiver.h"
#include "MIDISender.h"
#include "Misc.h"
#include "Ocpp.h"
#include "Profile.h"
#include "ProfileManager.h"
#include "PWoptions.h"
Expand Down Expand Up @@ -147,10 +146,6 @@ class MIDI2LRApplication final : public juce::JUCEApplication {
lr_ipc_in_.Start();
/* Check for latest version */
version_checker_.startThread();
#ifndef _WIN32
if (!juce::MessageManager::callAsync(rsj::FillInMessageLoop))
rsj::Log("Unable to post FillInMessageLoop to message queue.");
#endif
}
else {
quit();
Expand Down
1 change: 1 addition & 0 deletions Source/Ocpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace rsj {
[[nodiscard]] UniChar Utf8ToUtf16(const std::string& param);
void CheckPermission(pid_t pid);
void FillInMessageLoop();
bool FillInSucceeded();
} // namespace rsj
#endif
#endif

0 comments on commit 1015887

Please sign in to comment.