1
0
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:
Dany LE 2021-12-19 10:47:27 +01:00
parent 7371fd5032
commit 48fe04d362
3 changed files with 6 additions and 7 deletions

View File

@ -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 [
"

View File

@ -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
]

View File

@ -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.
]