diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 58564ce7..cb29992e 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -30,7 +30,49 @@ jobs: - name: Checkout repository submodules run: git submodule update --init --recursive - + + - name: Get gl4es latest commit hash + id: gl4es-sha + run: echo "::set-output name=sha::$(echo $(git ls-remote https://github.com/PojavLauncherTeam/gl4es-114-extra refs/heads/master | grep -io '^\S*'))" + shell: bash + + - name: Cache gl4es + uses: actions/cache@v2 + id: gl4es-cache + with: + path: gl4es/libs + key: gl4es-holy-ios-shared-2-${{ steps.gl4es-sha.outputs.sha }} + + - name: Get gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: 'PojavLauncherTeam/gl4es-114-extra' + path: 'gl4es' + + - name: Build gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + cd gl4es + git config --global user.email "github-actions@users.noreply.github.com" + git config --global user.name "github-actions" + export PATH=/opt/procursus/bin:$PATH + wget https://github.com/leetal/ios-cmake/raw/master/ios.toolchain.cmake + cmake -B build -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DDEFAULT_ES=2 \ + -DNOX11=ON -DNOEGL=OFF -DSTATICLIB=OFF -DPLATFORM=OS64 \ + -DCMAKE_C_FLAGS=-Wno-error=implicit-function-declaration + cmake --build build --config RelWithDebInfo --target GL + cp -R lib/libGL.dylib ../Natives/resources/Frameworks/libgl4es_114.dylib + + - name: Push gl4es + if: github.event != 'pull_request' && github.ref_name == 'main' && steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + git add Natives/resources/Frameworks/libgl4es_114.dylib + git commit -am "CI: Update gl4es" + git push + - name: Get JRE8 uses: dawidd6/action-download-artifact@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8de5afc5..a666e359 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,48 @@ jobs: - name: Checkout repository submodules run: git submodule update --init --recursive - + + - name: Get gl4es latest commit hash + id: gl4es-sha + run: echo "::set-output name=sha::$(echo $(git ls-remote https://github.com/PojavLauncherTeam/gl4es-114-extra refs/heads/master | grep -io '^\S*'))" + shell: bash + + - name: Cache gl4es + uses: actions/cache@v2 + id: gl4es-cache + with: + path: gl4es/libs + key: gl4es-holy-ios-shared-${{ steps.gl4es-sha.outputs.sha }} + + - name: Get gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: 'PojavLauncherTeam/gl4es-114-extra' + path: 'gl4es' + + - name: Build gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + cd gl4es + git config --global user.email "github-actions@users.noreply.github.com" + git config --global user.name "github-actions" + wget https://github.com/leetal/ios-cmake/raw/master/ios.toolchain.cmake + cmake -B build -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DDEFAULT_ES=2 \ + -DNOX11=ON -DNOEGL=OFF -DSTATICLIB=OFF -DPLATFORM=OS64 \ + -DCMAKE_C_FLAGS=-Wno-error=implicit-function-declaration + cmake --build build --config RelWithDebInfo --target GL + cp -R lib/libGL.dylib ../Natives/resources/Frameworks/libgl4es_114.dylib + + - name: Push gl4es + if: github.event != 'pull_request' && github.ref_name == 'main' && steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + git add Natives/resources/Frameworks/libgl4es_114.dylib + git commit -am "CI: Update gl4es" + git push + - name: Get JRE8 uses: dawidd6/action-download-artifact@v2 with: diff --git a/JavaApp/src/main/java/org/lwjgl/opengl/GLFWInputImplementation.java b/JavaApp/src/main/java/org/lwjgl/input/GLFWInputImplementation.java similarity index 97% rename from JavaApp/src/main/java/org/lwjgl/opengl/GLFWInputImplementation.java rename to JavaApp/src/main/java/org/lwjgl/input/GLFWInputImplementation.java index 308899cf..ed775b99 100644 --- a/JavaApp/src/main/java/org/lwjgl/opengl/GLFWInputImplementation.java +++ b/JavaApp/src/main/java/org/lwjgl/input/GLFWInputImplementation.java @@ -178,7 +178,6 @@ public class GLFWInputImplementation implements InputImplementation { last_event_nanos = nanos; } public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) { - //System.out.println("LWJGL2: debug keyboard=" + keycode + ", state=" + state + ", repeat=" + repeat); key_down_buffer[keycode] = state; keyboardEvent.clear(); keyboardEvent.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte)1 : (byte)0); diff --git a/Natives/LauncherNavigationController.m b/Natives/LauncherNavigationController.m index c029acd2..47f3f58e 100644 --- a/Natives/LauncherNavigationController.m +++ b/Natives/LauncherNavigationController.m @@ -18,6 +18,8 @@ @interface LauncherNavigationController () { } +@property(nonatomic) UIView* fakeToolbar; + @property(nonatomic) NSMutableArray* versionList; @property(nonatomic) UIPickerView* versionPickerView; @@ -76,9 +78,11 @@ targetToolbar = self.toolbar; } else { // iOS 13.x and 12.x // Workaround user interaction issue by using a fake toolbar - targetToolbar = [[UIView alloc] initWithFrame:self.toolbar.frame]; + CGRect frame = self.toolbar.frame; + frame.origin.y -= frame.size.height; + self.fakeToolbar = [[UIView alloc] initWithFrame:frame]; + targetToolbar = self.fakeToolbar; targetToolbar.autoresizingMask = self.toolbar.autoresizingMask; - [self.view addSubview:targetToolbar]; } [targetToolbar addSubview:self.versionTextField]; @@ -126,6 +130,13 @@ self.navigationBar.prefersLargeTitles = YES; } +- (void)viewWillAppear:(BOOL)animated { + if (self.fakeToolbar != nil) { + // Make this view appear on top of the real one + [self.view addSubview:self.fakeToolbar]; + } +} + - (BOOL)isVersionInstalled:(NSString *)versionId { NSString *localPath = [NSString stringWithFormat:@"%s/versions/%@", getenv("POJAV_GAME_DIR"), versionId]; diff --git a/Natives/LauncherPreferencesViewController.m b/Natives/LauncherPreferencesViewController.m index efd07a9f..2096c109 100644 --- a/Natives/LauncherPreferencesViewController.m +++ b/Natives/LauncherPreferencesViewController.m @@ -238,6 +238,11 @@ typedef void(^CreateView)(UITableViewCell *, NSString *, NSDictionary *); @"hasDetail": @YES, @"type": self.typeSwitch, }, + @{@"key": @"slideable_hotbar", + @"hasDetail": @YES, + @"icon": @"slider.horizontal.below.rectangle", + @"type": self.typeSwitch + }, @{@"key": @"press_duration", @"hasDetail": @YES, @"icon": @"cursorarrow.click.badge.clock", diff --git a/Natives/resources/Frameworks/libgl4es_114.dylib b/Natives/resources/Frameworks/libgl4es_114.dylib index 8d9a4116..c4a3a0a6 100644 Binary files a/Natives/resources/Frameworks/libgl4es_114.dylib and b/Natives/resources/Frameworks/libgl4es_114.dylib differ