mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-26 19:38:22 +01:00
allow to set system resolution using the DIYA_RES environment variable
This commit is contained in:
parent
5058d62876
commit
a8b89f19c5
@ -113,8 +113,23 @@ DiyaBoot >> render [
|
|||||||
|
|
||||||
{ #category : #events }
|
{ #category : #events }
|
||||||
DiyaBoot >> run [
|
DiyaBoot >> run [
|
||||||
self init.
|
|envar arr|
|
||||||
self startx.
|
envar := Smalltalk getenv:'DIYA_RES'.
|
||||||
|
arr := nil.
|
||||||
|
envar ifNotNil: [
|
||||||
|
arr := (envar splitOn: 'x') collect: [ :e| e asInteger ] .
|
||||||
|
arr size = 2 ifFalse:[
|
||||||
|
arr := nil.
|
||||||
|
]
|
||||||
|
].
|
||||||
|
arr
|
||||||
|
ifNil: [
|
||||||
|
self init.
|
||||||
|
self startx.
|
||||||
|
]
|
||||||
|
ifNotNil: [
|
||||||
|
self run: (arr at:1) @ (arr at: 2)
|
||||||
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #running }
|
{ #category : #running }
|
||||||
|
5
Diya/DiyaRuntimeError.class.st
Normal file
5
Diya/DiyaRuntimeError.class.st
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Class {
|
||||||
|
#name : #DiyaRuntimeError,
|
||||||
|
#superclass : #DiyaError,
|
||||||
|
#category : #'Diya-Events'
|
||||||
|
}
|
6
Diya/SmalltalkImage.extension.st
Normal file
6
Diya/SmalltalkImage.extension.st
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Extension { #name : #SmalltalkImage }
|
||||||
|
|
||||||
|
{ #category : #'*Diya' }
|
||||||
|
SmalltalkImage >> getenv: key [
|
||||||
|
^ self ffiCall: #(char *getenv(const char *key)) module: LibC
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user