Initial commit
This commit is contained in:
commit
9a75f89146
10 changed files with 376 additions and 0 deletions
40
source/main.c
Normal file
40
source/main.c
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <3ds.h>
|
||||
#include "lvgl.h"
|
||||
#include "lv_ctr_disp.h"
|
||||
|
||||
// ote: expected 'lv_tick_get_cb_t' {aka 'long unsigned int (*)(void)'} but argument is of type 'u64 (*)(void)' {aka 'long long unsigned int (*)(void)'}
|
||||
long unsigned int sys_tick(void)
|
||||
{
|
||||
return (long unsigned int)svcGetSystemTick();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
lv_ctr_disp_init();
|
||||
lv_init();
|
||||
lv_tick_set_cb(sys_tick);
|
||||
|
||||
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||
lv_label_set_text(label, "Hello world");
|
||||
lv_obj_center(label);
|
||||
|
||||
// Main loop
|
||||
while (aptMainLoop())
|
||||
{
|
||||
lv_timer_handler();
|
||||
gspWaitForVBlank();
|
||||
gfxSwapBuffers();
|
||||
hidScanInput();
|
||||
|
||||
// Your code goes here
|
||||
u32 kDown = hidKeysDown();
|
||||
if (kDown & KEY_START)
|
||||
break; // break in order to return to hbmenu
|
||||
}
|
||||
|
||||
gfxExit();
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue