Skip to content

Commit

Permalink
fix: ChangeDpi: -ENOENT
Browse files Browse the repository at this point in the history
  • Loading branch information
cinit committed Aug 6, 2023
1 parent b80c335 commit eea549a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/cc/ioctl/hook/ui/misc/ChangeDpi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ object ChangeDpi : CommonConfigFunctionHook() {
var targetDpi: Int
get() {
val file = File(hostInfo.application.filesDir, KEY_TARGET_DPI)
if (!file.exists()) {
return 0;
}
try {
// read exact 4 bytes, little endian
FileInputStream(file).use {
Expand Down

0 comments on commit eea549a

Please sign in to comment.