mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-28 12:28:21 +01:00
Merge 7a17c17ed5
This commit is contained in:
commit
ad045dcc80
@ -155,9 +155,30 @@ DiyaBoot >> render [
|
|||||||
{ #category : #events }
|
{ #category : #events }
|
||||||
DiyaBoot >> run [
|
DiyaBoot >> run [
|
||||||
self init.
|
self init.
|
||||||
Transcript show: 'Current selected video driver: ', (SDL2 SDLGetCurrentVideoDriver); cr.
|
|
||||||
display := SDL_DisplayMode externalNew autoRelease.
|
display := SDL_DisplayMode externalNew autoRelease.
|
||||||
SDL2 SDLGetCurrentDisplayMode: display from:0.
|
SDL2 SDLGetCurrentDisplayMode: display from:0.
|
||||||
|
self startx
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #events }
|
||||||
|
DiyaBoot >> run: screenSize [
|
||||||
|
self init.
|
||||||
|
display := SDL_DisplayMode externalNew autoRelease.
|
||||||
|
SDL2 SDLGetCurrentDisplayMode: display from:0.
|
||||||
|
display w: screenSize x.
|
||||||
|
display h: screenSize y.
|
||||||
|
self startx
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #events }
|
||||||
|
DiyaBoot >> setCursorPosition: mappedEvt [
|
||||||
|
Transcript show: 'x: ', mappedEvt x asString, ' - y: ', mappedEvt y asString; cr.
|
||||||
|
window warpMouseX:((mappedEvt x)* (display w) )
|
||||||
|
Y: ((mappedEvt y) * (display h))
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #events }
|
||||||
|
DiyaBoot >> startx [
|
||||||
Transcript show:'Display resolution: ', display w asString, 'x',display h asString;cr.
|
Transcript show:'Display resolution: ', display w asString, 'x',display h asString;cr.
|
||||||
window := self createWindow.
|
window := self createWindow.
|
||||||
renderer := self createRenderer.
|
renderer := self createRenderer.
|
||||||
@ -167,10 +188,3 @@ DiyaBoot >> run [
|
|||||||
SDL2 quit.
|
SDL2 quit.
|
||||||
Transcript show: 'System quit'; cr.
|
Transcript show: 'System quit'; cr.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #events }
|
|
||||||
DiyaBoot >> setCursorPosition: mappedEvt [
|
|
||||||
Transcript show: 'x: ', mappedEvt x asString, ' - y: ', mappedEvt y asString; cr.
|
|
||||||
window warpMouseX:((mappedEvt x)* (display w) )
|
|
||||||
Y: ((mappedEvt y) * (display h))
|
|
||||||
]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user