mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-28 12:28:21 +01:00
Dont restart system after a snap when init the image
This commit is contained in:
parent
7371fd5032
commit
48fe04d362
@ -13,11 +13,6 @@ DiyaBoot class >> getLoadedClasses [
|
|||||||
ifFalse: [ c ] ]
|
ifFalse: [ c ] ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'class initialization' }
|
|
||||||
DiyaBoot class >> initialize [
|
|
||||||
Smalltalk addToStartUpList: DiyaBoot
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'system startup' }
|
{ #category : #'system startup' }
|
||||||
DiyaBoot class >> startUp: status [
|
DiyaBoot class >> startUp: status [
|
||||||
"
|
"
|
||||||
|
@ -37,12 +37,15 @@ DiyaInit >> checkDrivers [
|
|||||||
|
|
||||||
{ #category : #events }
|
{ #category : #events }
|
||||||
DiyaInit >> eventLoop [
|
DiyaInit >> eventLoop [
|
||||||
|status|
|
|status dm|
|
||||||
self checkDrivers.
|
self checkDrivers.
|
||||||
status := SDL2 init: SDL_INIT_EVERYTHING.
|
status := SDL2 init: SDL_INIT_EVERYTHING.
|
||||||
status = 0 ifFalse:[
|
status = 0 ifFalse:[
|
||||||
^ self error: SDL2 getErrorMessage.
|
^ self error: SDL2 getErrorMessage.
|
||||||
].
|
].
|
||||||
Transcript show: 'Current selected video driver ', (SDL2 SDLGetCurrentVideoDriver); cr.
|
Transcript show: 'Current selected video driver ', (SDL2 SDLGetCurrentVideoDriver); cr.
|
||||||
|
dm := SDL_DisplayMode new.
|
||||||
|
SDL2 SDLGetCurrentDisplayMode: dm from:0.
|
||||||
|
Transcript show: dm w asString, 'x',dm h asString;cr.
|
||||||
SDL2 quit
|
SDL2 quit
|
||||||
]
|
]
|
||||||
|
@ -89,7 +89,8 @@ ImageInitializer >> preloadSystem: loaded [
|
|||||||
ImageInitializer >> snap [
|
ImageInitializer >> snap [
|
||||||
Smalltalk globals at: #codeName put: 'diya'.
|
Smalltalk globals at: #codeName put: 'diya'.
|
||||||
self class removeFromSystem.
|
self class removeFromSystem.
|
||||||
|
Smalltalk addToShutDownList: DiyaBoot.
|
||||||
Smalltalk garbageCollect.
|
Smalltalk garbageCollect.
|
||||||
Smalltalk snapshot: true andQuit: false.
|
Smalltalk snapshot: true andQuit: true.
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user