Fix for Android build issue (#2225)

* Fix Android build issue

* Add copyright notice

* Add required empty line
This commit is contained in:
RH 2024-11-01 03:59:17 +11:00 committed by GitHub
parent 1e633a015d
commit f03efb8cf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,7 @@
/**************************************************************************** /****************************************************************************
Copyright (c) 2015-2016 Chukong Technologies Inc. Copyright (c) 2015-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
https://axmol.dev/ https://axmol.dev/
@ -49,15 +50,15 @@ public class AppActivity extends AxmolActivity{
return; return;
} }
// DO OTHER INITIALIZATION BELOW // DO OTHER INITIALIZATION BELOW
} }
@Override @Override
public Cocos2dxGLSurfaceView onCreateView() { public AxmolGLSurfaceView onCreateView() {
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this); AxmolGLSurfaceView glSurfaceView = new AxmolGLSurfaceView(this);
// Tests should create stencil buffer // Tests should create stencil buffer
glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8); glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
return glSurfaceView; return glSurfaceView;
} }
} }

View File

@ -1,6 +1,7 @@
/**************************************************************************** /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md).
https://axmol.dev/ https://axmol.dev/
@ -27,13 +28,13 @@ package org.axmol.sample.LuaJavaBridgeTest;
import org.axmol.lib.LuaBridge; import org.axmol.lib.LuaBridge;
public class LuaJavaBridgeTest public class LuaJavaBridgeTest
{ {
public static int addTwoNumbers(final int num1,final int num2){ public static int addTwoNumbers(final int num1,final int num2){
return num1 + num2; return num1 + num2;
} }
public static void callbackLua(final String tipInfo,final int luaFunc){ public static void callbackLua(final String tipInfo,final int luaFunc){
Cocos2dxLuaJavaBridge.callLuaFunctionWithString(luaFunc, "success"); LuaBridge.callLuaFunctionWithString(luaFunc, "success");
Cocos2dxLuaJavaBridge.releaseLuaFunction(luaFunc); LuaBridge.releaseLuaFunction(luaFunc);
} }
} }