mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v027r03? release.
I have a new WIP up. Again, this one has only source, as nothing has changed on Windows since wip01. This time, I've just cleaned up the OSS and OpenAL drivers. Nach will probably want to kill me, since by cleaned up, I mean "removed lots of not-so-helpful comments and safety checks", but I intend to add them back. Before v028, I'd like to have vai init() functions return a boolean success value, and have bsnes continue to fall back on lesser drivers until there are none left, in which case it won't use one. But it will keep the program from crashing. Also, I tried some black magic on the OSS4 support. Because soundcard.h is included in a different location than the OSS3 one, I tried manually defining the new SNDCTL options and invoking ioctl regardless of OSS version. This is supposed to be safe -- the ioctls should just fail silently and it will behave just like OSS3. Let me know if you have problems compiling or using the driver with OSS3, especially on non-Linux boxen. > Will you update the readme with recommendations for which sound driver to use on which system? I suppose I can do that. I was planning on writing up an article about OSS4 and such, perhaps I can just link to that in the readme. > I changed it to set_background_color(0, 255, 0) and sure enough I had a green statusbar. The main window background color was still black though. Assuming that set_background_color() is meant to be used for the main UI this is very odd. Okay, here's how this works. Inside the main window, there is a view control, which is a gtk_drawing_area(). I draw the video to this. When bsnes is in windowed mode, obviously this control fills the entire window. And the view control draws a black background by default. But when you go fullscreen, the view area centers itself on your screen (or tries to, some issues in GTK+ size requests render it non- perfect.) Now there's the problem that the window itself is exposed on the sides. Therefore, I have to set the window background to black here, otherwise it will show up gray, which is _very_ distracting in fullscreen mode, to say the least. Now, I only tell GTK+ to set the window to black. The reason I do this is because just setting the formcontainer to black has no effect, since containers do not draw a background. As for why that is causing your statusbar to render black ... good lord, I have no idea at all o.O I don't know what to do to fix this, unfortunately ... but at least we now know where the problem is so we can research it. Thank you very much for tracking that down [vEX], I realize my request to have an end-user look into that was unreasonable, but it's very much appreciated. > EDIT2: After some testing it doesn't appear that bsnes was guilty. I can't reproduce the memory consumption, but it could be all the recompiling bsnes that somehow ate all my memory. bsnes does appear to have a tiny memory leak at the moment. It loses about ~100k a minute on me. I'm not sure if it's specific to the Linux port or not. This will certainly be a hard one to track down in such a big program. > I believe OpenAL is pretty smart in frequency handling. Definitely. I don't really like complex APIs, but the buffering system in OpenAL will actually come in handy. I failed with DirectSound, but maybe with OpenAL I can manage to resample audio -- maybe even let OpenAL do the resampling for me by calculating the frequency as a measure of "how many samples should have been created" versus "how many actually were." That would be awesome. Combine that with OpenGL triple buffering, and SDL/libjsw joypad support, and wow ... I'll have something really, really usable :) [No archive available]
This commit is contained in:
parent
c32195cbd6
commit
f77aca7172