EmuProxyZA / osd write.c
From TivoZA
Back to emuProxyZA.
Download source (You will need to rename it to: osd_write.c)
To update the below source file, select Upload file and upload your new osd_write.c file (there is no need to upload it as a .txt). If you do upload a new version, please add a brief description to the change log at the bottom of this page indicating what changes you made and why.
[edit]
Source
#include <stdio.h> #include <sys/types.h> #include <fcntl.h> void osd_out(const char* str) { int fd = open("/tmp/osdconsole", O_WRONLY); write(fd, str, strlen(str)); close(fd); } void osd_write(const char* str) { char outStr[1024]; sprintf(outStr, "\033\133H%s\033\133J", str); osd_out(outStr); } void osd_init() { //Set context init string char init[500] = "\033\133+p"; // Reset to initial state strcat(init, "\033\1331;5;05;0y"); // Change Black strcat(init, "\033\1331;5;11;1y"); // Change Red strcat(init, "\033\1331;5;10;2y"); // Change Green strcat(init, "\033\1331;5;12;3y"); // Change Yellow strcat(init, "\033\1331;5;15;4y"); // Change Blue strcat(init, "\033\1331;5;01;5y"); // Change Magenta strcat(init, "\033\1331;5;10;6y"); // Change Cyan strcat(init, "\033\1331;5;04;7y"); // Change White strcat(init, "\033\1331;5;00;8y"); // Change Transparent strcat(init, "\033\1331;5;14;9y"); // Change Charcoal Transparent strcat(init, "\033\1331;2;7;46y"); // Change offsets strcat(init, "\033\1331;4;2y"); // Change number of usable rows strcat(init, "\033\1331;1y"); // Clear Page Buffer strcat(init, "\033\13337;48m"); // Default colors osd_out(init); } void osd_clear() { char *clear = "\033\133H\033\133J"; osd_out(clear); }
[edit]
Change Log
20 Oct 2006 - TivoZA: Uploaded the file


