Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
SquirrelJME
Commits
08312415
Commit
08312415
authored
Dec 28, 2019
by
Stephanie Gawroriski
Browse files
Base start on Display using system calls and framebuffer properties.
parent
5e386595
Changes
3
Hide whitespace changes
Inline
Side-by-side
runt/apis/midp-lcdui/javax/microedition/lcdui/Canvas.java
View file @
08312415
...
...
@@ -11,8 +11,6 @@
package
javax.microedition.lcdui
;
import
cc.squirreljme.runtime.cldc.annotation.ImplementationNote
;
import
cc.squirreljme.runtime.cldc.asm.NativeDisplayAccess
;
import
cc.squirreljme.runtime.cldc.asm.NativeDisplayEventCallback
;
import
cc.squirreljme.runtime.lcdui.common.CommonColors
;
import
cc.squirreljme.runtime.lcdui.event.EventTranslate
;
import
cc.squirreljme.runtime.lcdui.event.KeyNames
;
...
...
@@ -615,6 +613,8 @@ public abstract class Canvas
return
;
// Depends on the action
throw
new
todo
.
TODO
();
/*
switch (__type)
{
case NativeDisplayEventCallback.KEY_PRESSED:
...
...
@@ -631,7 +631,7 @@ public abstract class Canvas
default:
break;
}
}
*/
}
/**
...
...
runt/apis/midp-lcdui/javax/microedition/lcdui/Display.java
View file @
08312415
...
...
@@ -12,10 +12,9 @@ package javax.microedition.lcdui;
import
cc.squirreljme.jvm.Assembly
;
import
cc.squirreljme.jvm.DeviceFeedbackType
;
import
cc.squirreljme.jvm.FramebufferProperty
;
import
cc.squirreljme.jvm.SystemCallError
;
import
cc.squirreljme.jvm.SystemCallIndex
;
import
cc.squirreljme.runtime.cldc.asm.NativeDisplayAccess
;
import
cc.squirreljme.runtime.cldc.asm.NativeDisplayEventCallback
;
import
cc.squirreljme.runtime.lcdui.common.CommonColors
;
import
cc.squirreljme.runtime.lcdui.common.CommonMetrics
;
import
cc.squirreljme.runtime.lcdui.DisplayOrientation
;
...
...
@@ -1311,8 +1310,12 @@ public class Display
Map
<
Integer
,
Display
>
displays
=
Display
.
_DISPLAYS
;
synchronized
(
displays
)
{
// Map all displays
int
numdisplays
=
NativeDisplayAccess
.
numDisplays
();
// Try to obtain the address of the framebuffer
int
fbaddr
=
Assembly
.
sysCallV
(
SystemCallIndex
.
FRAMEBUFFER_PROPERTY
,
FramebufferProperty
.
ADDRESS
);
// There is only a single display if a framebuffer is supported
int
numdisplays
=
(
fbaddr
!=
0
?
1
:
0
);
for
(
int
i
=
0
;
i
<
numdisplays
;
i
++)
rv
.
add
(
Display
.
__mapDisplay
(
i
));
}
...
...
runt/apis/midp-lcdui/javax/microedition/lcdui/Displayable.java
View file @
08312415
...
...
@@ -10,7 +10,6 @@
package
javax.microedition.lcdui
;
import
cc.squirreljme.runtime.cldc.asm.NativeDisplayAccess
;
import
cc.squirreljme.runtime.lcdui.phoneui.ExposedDisplayable
;
import
cc.squirreljme.runtime.lcdui.SerializedEvent
;
import
cc.squirreljme.runtime.midlet.ActiveMidlet
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment