marqs85 / ossc

Open Source Scan Converter
http://junkerhq.net/xrgb/index.php/OSSC
GNU General Public License v3.0
480 stars 65 forks source link

Save the last profile used for each physical input #16

Closed megari closed 6 years ago

megari commented 6 years ago

Untested. I don't have the proper toolchain yet to even try compiling, so this PR may receive fixes as needed.

megari commented 6 years ago

Pushed a revamped version.

megari commented 6 years ago

I got the toolchain installed and worked out any problems I encountered. The current version compiles and has received some testing on the device.

megari commented 6 years ago

Rebased to current upstream.

megari commented 6 years ago

Information on the memory usage of this PR, with audio enabled:

Info: (sys_controller.elf) 35 KBytes program size (code + initialized data).
Info:                      1948 Bytes free for stack + heap.

Vanilla 0.79-aud:

Info: (sys_controller.elf) 35 KBytes program size (code + initialized data).
Info:                      2164 Bytes free for stack + heap.

So this feature takes 216 bytes.

megari commented 6 years ago

Shrunk the code down a bit to reclaim some of the lost memory:

Info: (sys_controller.elf) 35 KBytes program size (code + initialized data).
Info:                      1984 Bytes free for stack + heap.
megari commented 6 years ago

Oops, the last commit is buggy in that it ends up overwriting the video modes when a profile is saved. Will fix.

megari commented 6 years ago

With further refinements, including undoing unnecessary, memory-wasting things and moving the default input setting to initconfig, we're down to 160 bytes:

Info: (sys_controller.elf) 35 KBytes program size (code + initialized data).
Info:                      2004 Bytes free for stack + heap.