• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 365 366 367 368 369 Next »

[fix] Fragile (and maybe others), source included
View New Posts | View Today's Posts

Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[fix] Fragile (and maybe others), source included
05-21-2009, 09:18 PM (This post was last modified: 05-21-2009, 09:23 PM by orbb.)
#1
orbb Offline
Junior Member
**
Posts: 15
Threads: 3
Joined: May 2009
Lightbulb 
Hi Smile

I played this morning with the sources of dolphin, and I managed to fix the screen flickering problem in Fragile :p

The basic idea is that I check before each frame is displayed if the frame is black, and I dont display it in this case.

the source included is really basic, it checks only for 5 pixels, it should check for the full screen normally, so some screen wont be displayed... anyway, this is just a fix suggestion, so the devs should try to implement this hack and optimise it Smile

This fix seems to slow the emulation a little, and may break other games...

Ok, here's how to implement it :

- Edit the file source\Plugins\Plugin_VideoOGL\Src\render.cpp

- find the line : OpenGL_SwapBuffers();

- replace it with this piece of code :

// [ fix for Fragile by kamui_kun ...
BYTE pixels [15] ;

glReadPixels(300, 200, 1, 1, GL_RED, GL_BYTE, &pixels[0]);
glReadPixels(300, 400, 1, 1, GL_RED, GL_BYTE, &pixels[1]);
glReadPixels(700, 200, 1, 1, GL_RED, GL_BYTE, &pixels[2]);
glReadPixels(700, 400, 1, 1, GL_RED, GL_BYTE, &pixels[3]);
glReadPixels(500, 300, 1, 1, GL_RED, GL_BYTE, &pixels[4]);
glReadPixels(300, 200, 1, 1, GL_GREEN, GL_BYTE, &pixels[5]);
glReadPixels(300, 400, 1, 1, GL_GREEN, GL_BYTE, &pixels[6]);
glReadPixels(700, 200, 1, 1, GL_GREEN, GL_BYTE, &pixels[7]);
glReadPixels(700, 400, 1, 1, GL_GREEN, GL_BYTE, &pixels[8]);
glReadPixels(500, 300, 1, 1, GL_GREEN, GL_BYTE, &pixels[9]);
glReadPixels(300, 200, 1, 1, GL_BLUE, GL_BYTE, &pixels[10]);
glReadPixels(300, 400, 1, 1, GL_BLUE, GL_BYTE, &pixels[11]);
glReadPixels(700, 200, 1, 1, GL_BLUE, GL_BYTE, &pixels[12]);
glReadPixels(700, 400, 1, 1, GL_BLUE, GL_BYTE, &pixels[13]);
glReadPixels(500, 300, 1, 1, GL_BLUE, GL_BYTE, &pixels[14]);

if((pixels[0] != 0) || (pixels[1] != 0) || (pixels[2] != 0) || (pixels[3] != 0) || (pixels[4] != 0)
|| (pixels[5] != 0) || (pixels[6] != 0) || (pixels[7] != 0) || (pixels[8] != 0) || (pixels[9] != 0)
|| (pixels[10] != 0) || (pixels[11] != 0) || (pixels[12] != 0) || (pixels[13] != 0) || (pixels[14] != 0)
) OpenGL_SwapBuffers();
// ... ]

- compile, and play Smile
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
[fix] Fragile (and maybe others), source included - orbb - 05-21-2009, 09:18 PM
RE: [fix] Fragile (and maybe others), source included - student1 - 05-22-2009, 12:41 AM
RE: [fix] Fragile (and maybe others), source included - orbb - 05-22-2009, 12:47 AM
RE: [fix] Fragile (and maybe others), source included - cmccmc - 05-22-2009, 07:28 AM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-22-2009, 07:43 AM
RE: [fix] Fragile (and maybe others), source included - cmccmc - 05-22-2009, 08:10 AM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-22-2009, 11:15 AM
RE: [fix] Fragile (and maybe others), source included - hakunushi - 05-22-2009, 02:30 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-22-2009, 03:58 PM
RE: [fix] Fragile (and maybe others), source included - sl1nk3 - 05-23-2009, 02:40 AM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-22-2009, 04:36 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-22-2009, 04:42 PM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-22-2009, 04:49 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-22-2009, 04:55 PM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-22-2009, 04:59 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-22-2009, 07:53 PM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 05-23-2009, 12:43 AM
RE: [fix] Fragile (and maybe others), source included - nosound97 - 05-23-2009, 01:01 AM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 05-23-2009, 02:45 AM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-23-2009, 05:39 AM
RE: [fix] Fragile (and maybe others), source included - orbb - 05-23-2009, 04:39 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 05:25 PM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-23-2009, 05:49 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 05:54 PM
RE: [fix] Fragile (and maybe others), source included - orbb - 05-23-2009, 06:12 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 06:28 PM
RE: [fix] Fragile (and maybe others), source included - orbb - 05-23-2009, 06:39 PM
RE: [fix] Fragile (and maybe others), source included - downloadaja - 05-23-2009, 06:49 PM
RE: [fix] Fragile (and maybe others), source included - nosound97 - 05-23-2009, 06:52 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 06:52 PM
RE: [fix] Fragile (and maybe others), source included - nosound97 - 05-23-2009, 06:59 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 07:39 PM
RE: [fix] Fragile (and maybe others), source included - mo27772mo - 05-23-2009, 07:59 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-23-2009, 08:11 PM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-24-2009, 04:39 AM
RE: [fix] Fragile (and maybe others), source included - death-droid - 05-24-2009, 09:59 AM
RE: [fix] Fragile (and maybe others), source included - deathtotheweird - 05-24-2009, 03:02 PM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 05-25-2009, 03:20 AM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 06-02-2009, 12:56 AM
RE: [fix] Fragile (and maybe others), source included - val532 - 06-08-2009, 05:17 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 06-08-2009, 05:44 PM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 06-09-2009, 02:50 AM
RE: [fix] Fragile (and maybe others), source included - val532 - 06-09-2009, 03:15 AM
RE: [fix] Fragile (and maybe others), source included - death-droid - 06-10-2009, 11:02 AM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 06-10-2009, 12:29 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 06-10-2009, 02:37 PM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 06-10-2009, 03:10 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 06-10-2009, 04:26 PM
RE: [fix] Fragile (and maybe others), source included - LuisR14 - 06-10-2009, 04:45 PM
RE: [fix] Fragile (and maybe others), source included - death-droid - 06-10-2009, 06:19 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode