kodev: add hidpi shortcut and dpi argument (#3208)

* [doc] also generate base ffi doc
* kodev: add hidpi shortcut and dpi argument
* Bump base
This commit is contained in:
Frans de Jonge
2017-09-14 13:19:20 +02:00
committed by GitHub
parent f5a6e32887
commit e566a7ffc6
3 changed files with 17 additions and 4 deletions

2
base

Submodule base updated: 8c6551aa61...55025930a2

View File

@@ -18,4 +18,7 @@ topics = {
package = ''
format = 'markdown'
sort_modules = true
file = '../frontend'
file = {
'../frontend',
'../base/ffi',
}

14
kodev
View File

@@ -300,10 +300,11 @@ OPTIONS:
-h=X, --screen-height=X set height of the emulator screen (default: 720)
-w=X, --screen-width=X set width of the emulator screen (default: 540)
-d=X, --screen-dpi=X set DPI of the emulator screen (default: 160)
--no-build run reader without rebuilding
--disable-touch use this if you want to simulate keyboard only devices
-s=FOO --simulate=FOO simulate dimension and other specs for a given device model
supported model: kobo-aura-one, kindle3
supported model: kobo-aura-one, kindle3, hidpi
"
screen_width=540
screen_height=720
@@ -323,6 +324,9 @@ OPTIONS:
-h | --screen-height)
screen_height=${VALUE}
;;
-d | --screen-dpi)
screen_dpi=${VALUE}
;;
-s | --simulate)
device_model=${VALUE}
case ${device_model} in
@@ -333,6 +337,12 @@ OPTIONS:
kobo-aura-one)
screen_width=1404
screen_height=1872
screen_dpi=300
;;
hidpi)
screen_width=1500
screen_height=2000
screen_dpi=600
;;
*)
echo "ERROR: spec unknown for ${device_model}."
@@ -375,7 +385,7 @@ OPTIONS:
RETURN_VALUE=85
while [ $RETURN_VALUE -eq 85 ]; do
EMULATE_READER_W=${screen_width} EMULATE_READER_H=${screen_height} \
EMULATE_READER_W=${screen_width} EMULATE_READER_H=${screen_height} EMULATE_READER_DPI=${screen_dpi} \
./reader.lua -d "$args"
RETURN_VALUE=$?
done