mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Your Holy savior has come to save the day. Also fixed compiling in Linux, a memory leak, and checks if a glxcontext was created
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@419 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -23,6 +23,7 @@
|
|||||||
#include <wx/statbmp.h>
|
#include <wx/statbmp.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
|
#include <wx/imaglist.h>
|
||||||
|
|
||||||
#include "MemoryCards/GCMemcard.h"
|
#include "MemoryCards/GCMemcard.h"
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ namespace AOSound
|
|||||||
|
|
||||||
return(false);*/
|
return(false);*/
|
||||||
//if(soundData[0] != 0)
|
//if(soundData[0] != 0)
|
||||||
|
if(!device)
|
||||||
ao_play(device, soundData, numSoundBytes);
|
ao_play(device, soundData, numSoundBytes);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -112,7 +113,7 @@ namespace AOSound
|
|||||||
device = ao_open_live(default_driver, &format, NULL /* no options */);
|
device = ao_open_live(default_driver, &format, NULL /* no options */);
|
||||||
if (device == NULL) {
|
if (device == NULL) {
|
||||||
fprintf(stderr, "Error opening device.\n");
|
fprintf(stderr, "Error opening device.\n");
|
||||||
return 1;
|
return false;
|
||||||
}
|
}
|
||||||
buf_size = format.bits/8 * format.channels * format.rate;
|
buf_size = format.bits/8 * format.channels * format.rate;
|
||||||
buffer = (char*)calloc(buf_size, sizeof(char));
|
buffer = (char*)calloc(buf_size, sizeof(char));
|
||||||
@ -121,6 +122,7 @@ namespace AOSound
|
|||||||
}
|
}
|
||||||
void AOSound_StopSound()
|
void AOSound_StopSound()
|
||||||
{
|
{
|
||||||
|
free(buffer);
|
||||||
ao_close(device);
|
ao_close(device);
|
||||||
ao_shutdown();
|
ao_shutdown();
|
||||||
}
|
}
|
||||||
|
@ -338,6 +338,11 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
|||||||
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
||||||
/* create a GLX context */
|
/* create a GLX context */
|
||||||
GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE);
|
GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE);
|
||||||
|
if(!GLWin.ctx)
|
||||||
|
{
|
||||||
|
ERROR_LOG("Couldn't Create GLX context.Quit");
|
||||||
|
exit(0); // TODO: Don't bring down entire Emu
|
||||||
|
}
|
||||||
/* create a color map */
|
/* create a color map */
|
||||||
cmap = XCreateColormap(GLWin.dpy, RootWindow(GLWin.dpy, vi->screen),
|
cmap = XCreateColormap(GLWin.dpy, RootWindow(GLWin.dpy, vi->screen),
|
||||||
vi->visual, AllocNone);
|
vi->visual, AllocNone);
|
||||||
|
Reference in New Issue
Block a user