]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fix examples
authorfincs <fincs.alt1@gmail.com>
Sun, 6 Sep 2015 16:22:12 +0000 (18:22 +0200)
committerfincs <fincs.alt1@gmail.com>
Sun, 6 Sep 2015 16:22:12 +0000 (18:22 +0200)
examples/app_launch/source/main.c
examples/graphics/gpu/geoshader/source/gpu.c
examples/graphics/gpu/simple_tri/source/gpu.c
examples/graphics/gpu/textured_cube/source/gpu.c
examples/mvd/source/main.c

index 73cecb69f4e04a6d86a9119aa1ea13db803de006..6838e5c8361c2206a39f98e725bf711fc8f8baeb 100644 (file)
@@ -29,9 +29,9 @@ int main()
                        // Open an APT session so we can talk to the APT service
                        aptOpenSession();
                        // Prepare for the app launch
-                       APT_PrepareToDoAppJump(NULL, 0, 0x0004001000022400LL, 0); // *EUR* camera app title ID
+                       APT_PrepareToDoAppJump(0, 0x0004001000022400LL, 0); // *EUR* camera app title ID
                        // Tell APT to trigger the app launch and set the status of this app to exit
-                       APT_DoAppJump(NULL, 0x300 /* size of buf0 */, 0x20 /* size of buf1 */, buf0, buf1);
+                       APT_DoAppJump(0x300 /* size of buf0 */, 0x20 /* size of buf1 */, buf0, buf1);
                        // Close the APT session because we don't need APT anymore
                        aptCloseSession();
                }
index abb8cdd8411179814f05c418d6601caefabc4fb0..60761fcc0ea21404bbece0e9ac855d714f4426fb 100644 (file)
@@ -27,7 +27,7 @@ void gpuExit(void)
 
 void gpuClearBuffers(u32 clearColor)
 {
-       GX_SetMemoryFill(NULL,
+       GX_SetMemoryFill(
                colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
                depthBuf, 0,          &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
        gspWaitForPSC0(); // Wait for the fill to complete
@@ -67,11 +67,12 @@ void gpuFrameEnd(void)
        // Finish rendering
        GPU_FinishDrawing();
        GPUCMD_Finalize();
-       GPUCMD_FlushAndRun(NULL);
+       GPUCMD_FlushAndRun();
        gspWaitForP3D(); // Wait for the rendering to complete
 
        // Transfer the GPU output to the framebuffer
-       GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
+       GX_SetDisplayTransfer(
+               colorBuf, GX_BUFFER_DIM(240, 400),
                (u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
                DISPLAY_TRANSFER_FLAGS);
        gspWaitForPPF(); // Wait for the transfer to complete
index abb8cdd8411179814f05c418d6601caefabc4fb0..60761fcc0ea21404bbece0e9ac855d714f4426fb 100644 (file)
@@ -27,7 +27,7 @@ void gpuExit(void)
 
 void gpuClearBuffers(u32 clearColor)
 {
-       GX_SetMemoryFill(NULL,
+       GX_SetMemoryFill(
                colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
                depthBuf, 0,          &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
        gspWaitForPSC0(); // Wait for the fill to complete
@@ -67,11 +67,12 @@ void gpuFrameEnd(void)
        // Finish rendering
        GPU_FinishDrawing();
        GPUCMD_Finalize();
-       GPUCMD_FlushAndRun(NULL);
+       GPUCMD_FlushAndRun();
        gspWaitForP3D(); // Wait for the rendering to complete
 
        // Transfer the GPU output to the framebuffer
-       GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
+       GX_SetDisplayTransfer(
+               colorBuf, GX_BUFFER_DIM(240, 400),
                (u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
                DISPLAY_TRANSFER_FLAGS);
        gspWaitForPPF(); // Wait for the transfer to complete
index abb8cdd8411179814f05c418d6601caefabc4fb0..60761fcc0ea21404bbece0e9ac855d714f4426fb 100644 (file)
@@ -27,7 +27,7 @@ void gpuExit(void)
 
 void gpuClearBuffers(u32 clearColor)
 {
-       GX_SetMemoryFill(NULL,
+       GX_SetMemoryFill(
                colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
                depthBuf, 0,          &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
        gspWaitForPSC0(); // Wait for the fill to complete
@@ -67,11 +67,12 @@ void gpuFrameEnd(void)
        // Finish rendering
        GPU_FinishDrawing();
        GPUCMD_Finalize();
-       GPUCMD_FlushAndRun(NULL);
+       GPUCMD_FlushAndRun();
        gspWaitForP3D(); // Wait for the rendering to complete
 
        // Transfer the GPU output to the framebuffer
-       GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
+       GX_SetDisplayTransfer(
+               colorBuf, GX_BUFFER_DIM(240, 400),
                (u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
                DISPLAY_TRANSFER_FLAGS);
        gspWaitForPPF(); // Wait for the transfer to complete
index 7e8aec4fb5eec6c1579bdf48d3d072fecd0753a8..4ffef044aacf24a81db1b1d6edea1cdee941dc62 100644 (file)
@@ -58,7 +58,7 @@ void draw_startup()
        }
 
        memset(gfxtopadr, 0, 0x46500);
-       GSPGPU_FlushDataCache(NULL, inaddr, 0x46500);
+       GSPGPU_FlushDataCache(inaddr, 0x46500);
 
        printstring("mvd example\n");
 
@@ -79,7 +79,7 @@ void draw_startup()
 
        svcSleepThread(1000000000);//Not sure how to determine when frame processing finishes.
 
-       GSPGPU_InvalidateDataCache(NULL, outaddr, 0x100000);
+       GSPGPU_InvalidateDataCache(outaddr, 0x100000);
 
        f = fopen("sdmc:/mvd_outdata.bin", "w");
        if(f)