Skip to content

Commit

Permalink
Re-add function to load custom cold boot and game boot image
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiyaSyahriel committed Dec 4, 2022
1 parent 744c236 commit a96fde8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ fun XmbView.cbStart(){

fun XmbView.cbEnsureImageLoaded(){
if(state.coldBoot.image == null){
val i = context.vsh.getAllPathsFor(VshBaseDirs.VSH_RESOURCES_DIR, "COLDBOOT.PNG", createParentDir = false).find { it.exists() }
if(i != null) { state.coldBoot.image = BitmapFactory.decodeFile(i.absolutePath) }

state.coldBoot.image = getDrawable(R.drawable.coldboot_internal)?.toBitmap(1280, 720)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ fun XmbView.gbStart(){

private fun XmbView.gbEnsureImageLoaded(){
if(state.gameBoot.image == null){
val i = context.vsh.getAllPathsFor(VshBaseDirs.VSH_RESOURCES_DIR, "GAMEBOOT.PNG", createParentDir = false).find { it.exists() }
if(i != null) { state.gameBoot.image = BitmapFactory.decodeFile(i.absolutePath) }
state.gameBoot.image = getDrawable(R.drawable.gameboot_internal)?.toBitmap(1280, 720)
}

Expand Down

0 comments on commit a96fde8

Please sign in to comment.