Browse Source

Add screenshot_path config file parameter.

master v1.0
Alec Murphy 4 years ago
parent
commit
5c87bea840
3 changed files with 4 additions and 3 deletions
  1. +1
    -1
      HGBD.HC
  2. +1
    -1
      hgbdd
  3. +2
    -1
      hgbdd.conf.example

+ 1
- 1
HGBD.HC View File

@ -14,7 +14,7 @@
#define HGFS_BUF_SIZE 0x4000000
#define SCREENSHOT_FILE "/Tmp/ScreenShot.bmp"
#define SCREENSHOT_FILE "::/Tmp/ScreenShot.bmp"
CBlkDev *HGBD_DEV;
CDrv *HGBD;


+ 1
- 1
hgbdd View File

@ -128,7 +128,7 @@ def HGCScreenShot():
os.lseek(HGBD,BLK_SIZE,os.SEEK_SET)
open(tmp_file,"wb").write(os.read(HGBD,filesize))
ts = str(datetime.datetime.now())
screenshot_file = HGBD_CONF["hgfs_path"]+"/"+ts[:19].replace(' ','-').replace(':','-') + '.png'
screenshot_file = HGBD_CONF["screenshot_path"]+"/"+ts[:19].replace(' ','-').replace(':','-') + '.png'
os.system('gm convert "' + tmp_file + '" -colors 16 "' + screenshot_file + '"')
SetHGFSPerms(screenshot_file)
os.remove(tmp_file)


+ 2
- 1
hgbdd.conf.example View File

@ -1,6 +1,7 @@
{
"blk_dev":"/dev/ram0",
"hgfs_path":"/mnt/hgfs",
"hgfs_path":"/home/username/TempleOS",
"screenshot_path":"/home/username/TempleOS/Screenshots",
"log_file":"/var/log/hgbdd.log",
"tcp_addr":"127.0.0.1",
"tcp_port":7202,


Loading…
Cancel
Save