forked from LeenkxTeam/LNXRNT
Kore Update
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package tech.kinc
|
||||
package tech.kore
|
||||
|
||||
import android.app.NativeActivity
|
||||
import android.content.Context
|
||||
@ -18,9 +18,9 @@ import android.view.WindowManager
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class KincActivity: NativeActivity(), KeyEvent.Callback {
|
||||
class KoreActivity: NativeActivity(), KeyEvent.Callback {
|
||||
companion object {
|
||||
var instance: KincActivity? = null
|
||||
var instance: KoreActivity? = null
|
||||
|
||||
@JvmStatic
|
||||
fun showKeyboard() {
|
||||
@ -107,9 +107,9 @@ class KincActivity: NativeActivity(), KeyEvent.Callback {
|
||||
}
|
||||
}
|
||||
|
||||
class MyHandler(private val kincActivity: KincActivity) : Handler() {
|
||||
class MyHandler(private val koreActivity: KoreActivity) : Handler() {
|
||||
override fun handleMessage(msg: Message) {
|
||||
kincActivity.hideSystemUI()
|
||||
koreActivity.hideSystemUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -157,9 +157,9 @@ class KincActivity: NativeActivity(), KeyEvent.Callback {
|
||||
}
|
||||
|
||||
override fun onKeyMultiple(keyCode: Int, count: Int, event: KeyEvent): Boolean {
|
||||
this.nativeKincKeyPress(event.characters)
|
||||
this.nativeKoreKeyPress(event.characters)
|
||||
return false
|
||||
}
|
||||
|
||||
private external fun nativeKincKeyPress(chars: String)
|
||||
private external fun nativeKoreKeyPress(chars: String)
|
||||
}
|
||||
@ -1,16 +1,16 @@
|
||||
package tech.kinc
|
||||
package tech.kore
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
import android.view.Surface
|
||||
|
||||
class KincMoviePlayer(var path: String) {
|
||||
class KoreMoviePlayer(var path: String) {
|
||||
companion object {
|
||||
var players = ArrayList<KincMoviePlayer?>()
|
||||
var players = ArrayList<KoreMoviePlayer?>()
|
||||
|
||||
@JvmStatic
|
||||
fun updateAll() {
|
||||
for (player in KincMoviePlayer.players) {
|
||||
for (player in KoreMoviePlayer.players) {
|
||||
player!!.update()
|
||||
}
|
||||
}
|
||||
@ -20,7 +20,7 @@ class KincMoviePlayer(var path: String) {
|
||||
}
|
||||
}
|
||||
|
||||
private var movieTexture: KincMovieTexture? = null
|
||||
private var movieTexture: KoreMovieTexture? = null
|
||||
var id: Int = players.size
|
||||
|
||||
init {
|
||||
@ -28,13 +28,13 @@ class KincMoviePlayer(var path: String) {
|
||||
}
|
||||
|
||||
fun init() {
|
||||
movieTexture = KincMovieTexture()
|
||||
movieTexture = KoreMovieTexture()
|
||||
val surface = Surface(movieTexture!!.surfaceTexture)
|
||||
nativeCreate(path, surface, id)
|
||||
surface.release()
|
||||
}
|
||||
|
||||
fun getMovieTexture(): KincMovieTexture? {
|
||||
fun getMovieTexture(): KoreMovieTexture? {
|
||||
return movieTexture
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package tech.kinc
|
||||
package tech.kore
|
||||
|
||||
import android.graphics.SurfaceTexture
|
||||
import android.graphics.SurfaceTexture.OnFrameAvailableListener
|
||||
import android.opengl.GLES20
|
||||
|
||||
class KincMovieTexture: OnFrameAvailableListener {
|
||||
class KoreMovieTexture: OnFrameAvailableListener {
|
||||
private val GL_TEXTURE_EXTERNAL_OES: Int = 0x8D65
|
||||
|
||||
var textureId: Int = 0
|
||||
Reference in New Issue
Block a user