40 lines
891 B
C
40 lines
891 B
C
#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;
|
|
}
|