Skip to content

Commit

Permalink
not quite
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedowns committed Jan 22, 2024
1 parent b14bcf6 commit cd01a78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class LeiaSurfaceView(context: Context, attrs: AttributeSet) : InterlacedSurface
class LeiaHelper3D {

fun interface SurfaceListener {
fun onSurfaceChanged(surface: LeiaSurfaceView)
fun onSurfaceChanged(surface: Surface)
}

companion object {
Expand All @@ -63,7 +63,7 @@ class LeiaHelper3D {
}

fun update3dMode(surfaceView: InterlacedSurfaceView, enable3dMode: Boolean, hasFocus: Boolean) {
surfaceView.getConfig().use { config ->
surfaceView.config.use { config ->
config.setNumTiles(if (enable3dMode) 2 else 1, 1)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,15 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
val sL = LeiaHelper3D.SurfaceListener{ surface ->
Log.debug("SurfaceListener onSurfaceChanged called") // Log debug warning
emulationState.newSurface(surface)
leiaSurfaceView = surface;
}
binding.surfaceEmulation.setSurfaceListener(sL)

/*try{
binding.surfaceEmulation.holder.addCallback(this);
}catch(e: Exception){
Log.debug("SurfaceListener error: $e") // Log debug warning
}*/

binding.doneControlConfig.setOnClickListener {
binding.doneControlConfig.visibility = View.GONE
binding.surfaceInputOverlay.setIsInEditMode(false)
Expand Down

0 comments on commit cd01a78

Please sign in to comment.