Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP SDL FFI #2263

Merged
merged 5 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More work on SDL
  • Loading branch information
soywiz committed Jul 4, 2024
commit 410f52adda68134a6b8674735f4db4328b2d6276
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ kotlinx-coroutines = "1.9.0-RC"
kotlinx-serialization = "1.7.0"
kotlinx-atomicfu = "0.24.0"

korlibs = "6.0.0-alpha7"
#korlibs = "999.0.0.999"
#korlibs = "6.0.0-alpha7"
korlibs = "999.0.0.999"

kotlinx-benchmark = "0.4.7"
dokka = "1.9.10"
Expand Down
7 changes: 4 additions & 3 deletions korge-core/src/korlibs/kgl/KmlBufferExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ import korlibs.memory.*
fun Buffer.toAsciiString(): String {
var out = ""
for (n in 0 until size) {
val b = getInt8(n)
val b = getS8(n)
if (b == 0.toByte()) break
out += b.toInt().toChar()
}
//println("BUFFER.toAsciiString: $out")
return out
}

fun Buffer.putAsciiString(str: String): Buffer {
var n = 0
for (c in str) {
if (size >= n) setInt8(n++, c.code)
if (size >= n) set8(n++, c.code.toByte())
}
if (size >= n) setInt8(n++, 0)
if (size >= n) set8(n++, 0)
return this
}

Expand Down
Loading
Loading