@@ -145,8 +145,8 @@ void kgraphics_blit (const KGraphicsArea* destg, UINT x, UINT y, const KGraphics
145145 }
146146}
147147
148- void kgraphics_image_raw (const KGraphicsArea * g , UINT x , UINT y , UINT w , UINT h , UINT bytesPerPixel ,
149- U8 * bytes )
148+ void kgraphics_image_raw (const KGraphicsArea * g , UINT x , UINT y , UINT w , UINT h ,
149+ UINT bytesPerPixel , U8 * bytes )
150150{
151151 FUNC_ENTRY ("area: %px, x: %u, y: %u, w: %u, h: %u, bytes: %px" , g , x , y , w , h , bytes );
152152
@@ -219,21 +219,21 @@ bool kgraphics_init()
219219 kvmm_setAddressSpaceMetadata (g_kstate .context , (PTR )framebuffer , "vesafb" , NULL );
220220
221221 // Backbuffer: Store a copy of basic/global graphics mode information.
222- g_kstate .gx_back .bytesPerPixel = gxi .bytesPerPixel ;
223- g_kstate .gx_back .bytesPerRow = gxi .bytesPerScanLine ;
224- g_kstate .gx_back .width_px = gxi .xResolution ;
225- g_kstate .gx_back .height_px = gxi .yResolution ;
226- g_kstate .gx_back .bufferSizeBytes = PAGEFRAMES_TO_BYTES (szPages );
227- if (!(g_kstate .gx_back .buffer = (U8 * )
222+ g_kstate .gx_backfb .bytesPerPixel = gxi .bytesPerPixel ;
223+ g_kstate .gx_backfb .bytesPerRow = gxi .bytesPerScanLine ;
224+ g_kstate .gx_backfb .width_px = gxi .xResolution ;
225+ g_kstate .gx_backfb .height_px = gxi .yResolution ;
226+ g_kstate .gx_backfb .bufferSizeBytes = PAGEFRAMES_TO_BYTES (szPages );
227+ if (!(g_kstate .gx_backfb .buffer = (U8 * )
228228 kvmm_memmap (g_kstate .context , 0 , NULL , szPages ,
229229 VMM_MEMMAP_FLAG_IMMCOMMIT | VMM_MEMMAP_FLAG_KERNEL_PAGE , NULL ))) {
230230 RETURN_ERROR (ERROR_PASSTHROUGH , false);
231231 }
232- kvmm_setAddressSpaceMetadata (g_kstate .context , (PTR )g_kstate .gx_back .buffer , "gxbackbuffer" ,
232+ kvmm_setAddressSpaceMetadata (g_kstate .context , (PTR )g_kstate .gx_backfb .buffer , "gxbackbuffer" ,
233233 NULL );
234234
235235 // HW Framebuffer: Store a copy of basic/global graphics mode information.
236- g_kstate .gx_hwfb = g_kstate .gx_back ;
236+ g_kstate .gx_hwfb = g_kstate .gx_backfb ;
237237 g_kstate .gx_hwfb .buffer = (U8 * )framebuffer ;
238238
239239 KERNEL_PHASE_SET (KERNEL_PHASE_STATE_GRAPHICS_READY );
@@ -246,14 +246,14 @@ void kgraphis_flush()
246246 return ; // Graphics mode is not ready
247247 }
248248
249- KGraphicsArea * backbuffer = (KGraphicsArea * )& g_kstate .gx_back ;
249+ KGraphicsArea * backbuffer = (KGraphicsArea * )& g_kstate .gx_backfb ;
250250
251251 // Backbuffer must exactly match the vesa framebuffer
252252 k_assert (backbuffer != NULL && (void * )framebuffer != NULL , "Graphics buffers cannot be NULL" );
253- k_assert (g_kstate .gx_back .bytesPerRow == gxi .bytesPerScanLine , "Invalid backbuffer" );
254- k_assert (g_kstate .gx_back .bytesPerPixel == gxi .bytesPerPixel , "Invalid backbuffer" );
255- k_assert (g_kstate .gx_back .width_px == gxi .xResolution , "Invalid backbuffer" );
256- k_assert (g_kstate .gx_back .height_px == gxi .yResolution , "Invalid backbuffer" );
253+ k_assert (g_kstate .gx_backfb .bytesPerRow == gxi .bytesPerScanLine , "Invalid backbuffer" );
254+ k_assert (g_kstate .gx_backfb .bytesPerPixel == gxi .bytesPerPixel , "Invalid backbuffer" );
255+ k_assert (g_kstate .gx_backfb .width_px == gxi .xResolution , "Invalid backbuffer" );
256+ k_assert (g_kstate .gx_backfb .height_px == gxi .yResolution , "Invalid backbuffer" );
257257
258258 arch_waitForNextVerticalRetrace ();
259259 draw_cursor (backbuffer );
0 commit comments