Author Topic: Diving into squirrel-scripting: some questions  (Read 14442 times)

Arcade-TV

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #15 on: February 03, 2019, 12:33:05 AM »
Not sure what a screen blank is.

or a console-blanking, when the screen turns off - a screensaver.
as I said I already went for the grub-option but it's not working.

RetroArch has some kind of disabling that works a charm...

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #16 on: February 03, 2019, 04:39:33 AM »
Not sure what a screen blank is.

or a console-blanking, when the screen turns off - a screensaver.
as I said I already went for the grub-option but it's not working.

RetroArch has some kind of disabling that works a charm...

What distro are you using?

Arcade-TV

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #17 on: February 03, 2019, 05:01:00 AM »
What distro are you using?

Ubuntu Server 18.04 LTS


Arcade-TV

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #19 on: February 04, 2019, 12:58:29 AM »
Unfortunately I already tried every grub-related solution prior to my post and none of those work for me.
Must be something related to X, I dunno.


Arcade-TV

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #20 on: February 04, 2019, 03:51:34 AM »
I have decided to use 2 layouts, one for menu and one for lists.
Now, if I wanted to return from a display straight into the last viewed system I need to fill and read a global variable.

In my menu layout:

Code: [Select]
if(::last_display_index){
    jumpToSystem(::last_display_index);
}else{
    jumpToSystem(0);
}

and in the Emulator/List layout:

Code: [Select]
::last_display_index = fe.list.display_index;

This kind of declaration must be wrong, because I always get "The index last_display_index does not exist."[/s]


edit:
The solution to this was rather simple...

Code: [Select]
local sys_index = fe.list.index;
local sys_index_name = fe.displays[sys_index].name;
my "sys_index" controlls the system to show.
« Last Edit: February 04, 2019, 06:46:52 AM by Arcade-TV »

Arcade-TV

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Diving into squirrel-scripting: some questions
« Reply #21 on: February 05, 2019, 06:39:23 AM »
I think I managed to get rid of the screensaver by disabling DPMS with "xset":

Check for any blanking, screensaver, timeouts and DPMS (Energy Star) with
Code: [Select]
xset q

Disable DPMS:
Code: [Select]
xset -dpms

Don't forget to add these to a script and execute it on startup.