Skip to content

Commit

Permalink
bump sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Mar 24, 2024
1 parent e0791dc commit 4168685
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-22.04
env:
SDK_VERSION: 3.1.56.0bi
SDK_VERSION: 3.1.57.0bi
SYS_PYTHON: /usr/bin/python3
PACKAGES: emsdk hpy pygame
BUILD_STATIC: emsdk hpy
Expand Down
10 changes: 5 additions & 5 deletions src/pygbag/support/pygbag_ux.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ def y(*argv):


def r(*argv):
x = ux(argv[0])
y = uy(argv[1])
ret = [x, y]
rx = x(argv[0])
ry = y(argv[1])
ret = [rx, ry]
if len(argv) > 2:
w = ux(argv[2])
h = uy(argv[3])
w = x(argv[2])
h = y(argv[3])
ret.append(w)
ret.append(h)
return ret
Expand Down
29 changes: 13 additions & 16 deletions static/pythons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,14 +1002,7 @@ function feat_smp() {
dlhandler.loading = "lazy"
dlhandler.width = "470px"
dlhandler.height = "30%"
/*
dlhandler.style.top = "70%"
dlhandler.style.right = "0px"
dlhandler.style.height = "30%"
dlhandler.style.border = ""
dlhandler.style.postition = "absolute"
*/
dlhandler.style = "position: relative;top: 0px;right: 0px;border: 1px solid red;"
dlhandler.style = "position: absolute;top: 12px;right: 12px;border: 1px solid red;"

dlhandler.frameborder = "1"
dlhandler.sandbox="allow-same-origin allow-top-navigation allow-scripts allow-pointer-lock"
Expand Down Expand Up @@ -2260,10 +2253,7 @@ async function onload() {
var has_vt = false

for (const feature of vm.config.features) {
if (feature.startsWith("3d")) {
vm.config.user_canvas_managed = 3
}

// embed is for canvas only, do not handle anything else.
if (feature.startsWith("embed")) {

vm.config.user_canvas_managed = vm.config.user_canvas_managed || 1
Expand All @@ -2276,6 +2266,16 @@ async function onload() {
break
}

// position iframe first
if (feature.startsWith("smp")) {
// cannot be hidden
feat_smp()
}

if (feature.startsWith("3d")) {
vm.config.user_canvas_managed = 3
}

if (feature.startsWith("snd")) {
feat_snd(debug_hidden)
}
Expand Down Expand Up @@ -2320,10 +2320,7 @@ async function onload() {
console.warn("NO VT/stdout on mobile, use remote debugger or explicit flag")
}

if (feature.startsWith("smp")) {
// cannot be hidden
feat_smp()
}


}

Expand Down

0 comments on commit 4168685

Please sign in to comment.