LibXenon Examples: Difference between revisions
Jump to navigation
Jump to search
imported>Tuxuser m (Text replace - "Category:Development" to "Category:Xbox360_Development") |
imported>Tuxuser m (Text replace - "Category:Homebrew" to "Category:Xbox360_Homebrew_Software") |
||
Line 64: | Line 64: | ||
When you are writing your own programs you can just take the Makefile from this HelloWorld application, put it in your sourcecode-folder and move all the sourcecode-files of your project into a folder "source" so the Makefile can find them. | When you are writing your own programs you can just take the Makefile from this HelloWorld application, put it in your sourcecode-folder and move all the sourcecode-files of your project into a folder "source" so the Makefile can find them. | ||
[[Category: | [[Category:Xbox360_Homebrew_Software]] | ||
[[Category:Xbox360_Development]] | [[Category:Xbox360_Development]] |
Latest revision as of 00:24, 7 January 2014
XMENU source code by User:cpasjuste:
Download: libxenon.org
Genesis Plus + SMS Plus source code by User:ced2911:
Genesis Plus: http://www.multiupload.com/6QYQL218GB
SMS Plus: http://www.multiupload.com/62T7RVYB5A
Controller Button test code by User:ced2911:
Source Code (incl. Makefile): Download
#include <stdio.h> #include <stdlib.h> #include <input/input.h> #include <xenos/xenos.h> #include <console/console.h> void mainInit() { //init xenos_init(); console_init(); kmem_init(); usb_init(); usb_do_poll(); } int main() { mainInit(); printf("Test\n"); struct controller_data_s oldc; while(1) { struct controller_data_s c; if (get_controller_data(&c, 0)) { if((c.a)&&(!oldc.a)) { printf("a pushed\n"); } if((!c.a)&&(oldc.a)) { printf("a released\n"); } oldc=c; } usb_do_poll(); } return 0; }
Compiling LibXenon Code
All of these samples/programs include a Makefile, so its easy to compile them with the Toolchain.
cd into_the_directory make CROSS_COMPILE=xenon-
When you are writing your own programs you can just take the Makefile from this HelloWorld application, put it in your sourcecode-folder and move all the sourcecode-files of your project into a folder "source" so the Makefile can find them.