X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FApplications%2Faxwin4_src%2FUI%2Fmain.c;h=54eae0ff1f2f521b3143bf839f81a116f1b62b0b;hb=f3bdde1ff0ec3cf20c1371a50eb37a0907fe00c5;hp=3b94448f817f0d0654de352b67a874bdc3d04934;hpb=74ccd1fff633643363e5c03785dba4ed9b44351e;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin4_src/UI/main.c b/Usermode/Applications/axwin4_src/UI/main.c index 3b94448f..54eae0ff 100644 --- a/Usermode/Applications/axwin4_src/UI/main.c +++ b/Usermode/Applications/axwin4_src/UI/main.c @@ -15,13 +15,23 @@ int main(int argc, const char *argv[]) tAxWin4_Window *bgwin = AxWin4_CreateWindow("background"); + unsigned int w, h; + AxWin4_GetScreenDimensions(0, &w, &h); + AxWin4_MoveWindow(bgwin, 0,0); - AxWin4_ResizeWindow(bgwin, 640,480); - //AxWin4_SetWindowFlags(bgwin, AXWIN4_WNDFLAG_NODECORATE|AXWIN4_WNDFLAG_KEEPBELOW); + AxWin4_ResizeWindow(bgwin, w,h); + AxWin4_SetWindowFlags(bgwin, AXWIN4_WNDFLAG_NODECORATE|AXWIN4_WNDFLAG_KEEPBELOW); + AxWin4_ShowWindow(bgwin, true); + + uint32_t *buf = AxWin4_GetWindowBuffer(bgwin); + _SysDebug("buf = %p", buf); // Load image - //char *image = malloc(640*480*4); - //AxWin4_DrawBitmap(bgwin, 0, 0, 640, 480, image); + uint32_t *image = malloc(w*h*4); + for(size_t i = 0; i < w*h; i ++ ) + image[i] = i*(0x1000000/w*h); + + //AxWin4_DrawBitmap(bgwin, 0, 0, w, h, (void*)image); _SysDebug("Beginning queue");