mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
rainbow: compile errors, porting some restructure, no new code
git-svn-id: svn://ultimatepp.org/upp/trunk@3644 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5d80e3e0a4
commit
ca8f753457
8 changed files with 96 additions and 6 deletions
|
|
@ -156,14 +156,37 @@ void FBUpdate(const Rect& inv)
|
|||
{
|
||||
//The invalidated areas accumulate in the update region until the region is processed when the next WM_PAINT message occurs
|
||||
SDL_LockSurface(screen);
|
||||
|
||||
const ImageBuffer& framebuffer = Ctrl::GetFrameBuffer();
|
||||
|
||||
memcpy(screen->pixels, (const char*)~framebuffer, framebuffer.GetLength() * sizeof(RGBA));
|
||||
#if 1
|
||||
memcpy(screen->pixels, ~framebuffer, framebuffer.GetLength() * sizeof(RGBA));
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
ASSERT(Size(screen->w,screen->h) == framebuffer.GetSize());
|
||||
|
||||
Size ssz = inv.GetSize();
|
||||
Size dsz = framebuffer.GetSize();
|
||||
|
||||
ASSERT(Rect(dsz).Contains(inv));
|
||||
|
||||
for(int i = inv.top; i < inv.bottom; i++)
|
||||
{
|
||||
uint32 o = i * dsz.cx + inv.left;
|
||||
memcpy(((RGBA*)screen->pixels) + o, (~framebuffer) + o, ssz.cx * sizeof(RGBA));
|
||||
}
|
||||
#endif
|
||||
|
||||
SDL_UnlockSurface(screen);
|
||||
SDL_Flip(screen);
|
||||
}
|
||||
|
||||
void FBFlush()
|
||||
{
|
||||
// ::UpdateWindow(fbHWND);
|
||||
// GdiFlush();
|
||||
}
|
||||
|
||||
void FBInit()
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue