Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 994:33616b2789de
SDL mode fix
author | yutaka@charles.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 11 Oct 2010 14:21:02 +0900 |
parents | 0b8f9d4d7dab |
children | ad5232ad4952 |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Sat Oct 09 19:11:45 2010 +0900 +++ b/Renderer/Engine/viewer.cc Mon Oct 11 14:21:02 2010 +0900 @@ -34,7 +34,7 @@ RederingData r[2]; -int ppi, spi; +int ppi, spi = 0; /** * @@ -293,7 +293,7 @@ { HTaskPtr task_next = initLoop(); - task_next->set_post(&post2runLoop, (void *)this, 0); // set_post(function(this->run_loop()), NULL) + task_next->set_post(&post2runLoop, (void *)this, (void*)pixels); // set_post(function(this->run_loop()), NULL) task_next->spawn(); } @@ -311,6 +311,7 @@ } dev->clean_pixels(); + pixels = dev->flip_screen(pixels); /* ここでGameTaskの終了を待つTaskを生成しておく */ @@ -357,6 +358,8 @@ static void post2runLoop(SchedTask *s, void *viewer_, void *arg) { + + Viewer *viewer = (Viewer*)viewer_; HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_loop(task_next); @@ -377,7 +380,7 @@ { common_draw(task_next); - task_next->set_post(post2runLoop, (void*)this, 0); // set_post(function(this->run_loop()), NULL) + task_next->set_post(post2runLoop, (void*)this, (void*)pixels); // set_post(function(this->run_loop()), NULL) task_next->spawn(); // TASK_DRAW_SPAN が全て終わったら DUMMY_TASK が Viewer::run_loop() を呼ぶ