Skip to content

Commit

Permalink
Merge pull request #81 from sparker256/master
Browse files Browse the repository at this point in the history
Added Support for SDK 303
  • Loading branch information
sparker256 authored Nov 7, 2021
2 parents b32fdbd + 98664ee commit f23a54c
Show file tree
Hide file tree
Showing 74 changed files with 11,959 additions and 12,376 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ jobs:

- name: Create plugin archive
if: github.event_name == 'release'
run: zip -r FlyWithLua_all_platforms.zip FlyWithLua/
run: zip -r FlyWithLua_NG_Lin_Mac_Win.zip FlyWithLua/

- name: Upload binaries to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: FlyWithLua_all_platforms.zip
file: FlyWithLua_NG_Lin_Mac_Win.zip
tag: ${{ github.ref }}
overwrite: true
overwrite: true
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ endif ()
set(CMAKE_CXX_STANDARD 14)

# Set include directories used by our code and dependencies.
include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/Widgets")
include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/Wrappers")
include_directories("${CMAKE_SOURCE_DIR}/XPSDK301/CHeaders/XPLM")
include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/Widgets")
include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/Wrappers")
include_directories("${CMAKE_SOURCE_DIR}/SDK/CHeaders/XPLM")
include_directories("${CMAKE_SOURCE_DIR}/include64")
include_directories("${CMAKE_SOURCE_DIR}/hidapi")
include_directories("${CMAKE_SOURCE_DIR}/.")
Expand All @@ -39,15 +39,15 @@ endif (WIN32)
if (WIN32)
list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/include64")
list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/GLUT_for_Windows/GL")
list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/XPSDK301/Libraries/Win")
list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/SDK/Libraries/Win")
elseif (APPLE)
list(APPEND CMAKE_FRAMEWORK_PATH "${CMAKE_SOURCE_DIR}/XPSDK301/Libraries/Mac")
list(APPEND CMAKE_FRAMEWORK_PATH "${CMAKE_SOURCE_DIR}/SDK/Libraries/Mac")
elseif (UNIX)
endif ()


# Enable all X-Plane SDK APIs up to the newest version.
add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1)
add_definitions(-DXPLM200=1 -DXPLM210=1 -DXPLM300=1 -DXPLM301=1 -DXPLM303=1)
# Define platform macros.
add_definitions(-DAPL=$<BOOL:${APPLE}> -DIBM=$<BOOL:${WIN32}> -DLIN=$<AND:$<BOOL:${UNIX}>,$<NOT:$<BOOL:${APPLE}>>>)

Expand Down
20 changes: 3 additions & 17 deletions src/FlyWithLua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// FlyWithLua Plugin for X-Plane 11
// ----------------------------------

#define PLUGIN_VERSION "2.7.31 build " __DATE__ " " __TIME__
#define PLUGIN_VERSION "2.7.32 build " __DATE__ " " __TIME__

#define PLUGIN_NAME "FlyWithLua NG"
#define PLUGIN_DESCRIPTION "Next Generation Version " PLUGIN_VERSION
Expand Down Expand Up @@ -133,6 +133,8 @@
* v2.7.30 [added] global varables PLANE_AUTHOR and PLANE_DESCRIP Thanks to Steven L. Goldberg.
* [fixed] bug if you used the reload pluggins function Thanks to Steven L. Goldberg.
* v2.7.31 [fixed] Fix hid_send_filled_feature_report, adjust length check Thanks to Daniel Peukert.
* v2.7.32 [fixed] Fix bug so we can now use SDK 303.
*
*
*
* Markus (Teddii):
Expand Down Expand Up @@ -6688,14 +6690,6 @@ bool ReadAllScriptFiles()
lua_pushstring(FWLLua, PlaneAuthor);
lua_setglobal(FWLLua, "PLANE_AUTHOR");

// if we are still in boot phase of X-Plane, we do not want to load files
if (XPLMInitialized() == 0)
{
logMsg(logToDevCon, "FlyWithLua Info: X-Plane is still booting, we do not want to read files during startup.");
CrashReportDisplayed = false;
return true;
}

// run through the init script
std::ostringstream oss_IntPathAndName;
oss_IntPathAndName << internalsDir << "FlyWithLua.ini";
Expand Down Expand Up @@ -6915,14 +6909,6 @@ bool ReadAllQuarantinedScriptFiles()
char* QtFileIndex[250];
int Qt_result;

// if we are still in boot phase of X-Plane, we do not want to load files
if (XPLMInitialized() == 0)
{
logMsg(logToDevCon, "FlyWithLua Info: X-Plane is still booting, we do not want to read files during startup.");
CrashReportDisplayed = false;
return true;
}

if (XPLMGetDirectoryContents(quarantineDir.c_str(), 0, QtFilesInFolder, sizeof(QtFilesInFolder), QtFileIndex, 250,
reinterpret_cast<int *>(&TotalNumberOfQtFiles), reinterpret_cast<int *>(&NumberOfQtFiles)))
{
Expand Down
Loading

0 comments on commit f23a54c

Please sign in to comment.