mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-27 03:48: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 ] ]
|
||||
]
|
||||
|
||||
{ #category : #'class initialization' }
|
||||
DiyaBoot class >> initialize [
|
||||
Smalltalk addToStartUpList: DiyaBoot
|
||||
]
|
||||
|
||||
{ #category : #'system startup' }
|
||||
DiyaBoot class >> startUp: status [
|
||||
"
|
||||
|
@ -37,12 +37,15 @@ DiyaInit >> checkDrivers [
|
||||
|
||||
{ #category : #events }
|
||||
DiyaInit >> eventLoop [
|
||||
|status|
|
||||
|status dm|
|
||||
self checkDrivers.
|
||||
status := SDL2 init: SDL_INIT_EVERYTHING.
|
||||
status = 0 ifFalse:[
|
||||
^ self error: SDL2 getErrorMessage.
|
||||
].
|
||||
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
|
||||
]
|
||||
|
@ -89,7 +89,8 @@ ImageInitializer >> preloadSystem: loaded [
|
||||
ImageInitializer >> snap [
|
||||
Smalltalk globals at: #codeName put: 'diya'.
|
||||
self class removeFromSystem.
|
||||
Smalltalk addToShutDownList: DiyaBoot.
|
||||
Smalltalk garbageCollect.
|
||||
Smalltalk snapshot: true andQuit: false.
|
||||
Smalltalk snapshot: true andQuit: true.
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user