mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Fixed some log messages
Fixed a crash when no game ini exists git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2690 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -82,6 +82,9 @@ void Config::Load()
|
||||
|
||||
void Config::GameIniLoad() {
|
||||
IniFile *iniFile = ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.gameIni;
|
||||
if (! iniFile)
|
||||
return;
|
||||
|
||||
if (iniFile->Exists("Video", "ForceFiltering"))
|
||||
iniFile->Get("Video", "ForceFiltering", &bForceFiltering, 0);
|
||||
|
||||
|
@ -336,22 +336,22 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
};
|
||||
|
||||
if (!(hDC=GetDC(EmuWindow::GetWnd()))) {
|
||||
MessageBox(NULL,"(1) Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||
PanicAlert("(1) Can't Create A GL Device Context.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(PixelFormat = ChoosePixelFormat(hDC,&pfd))) {
|
||||
MessageBox(NULL,"(2) Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||
PanicAlert("(2) Can't Find A Suitable PixelFormat.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SetPixelFormat(hDC,PixelFormat,&pfd)) {
|
||||
MessageBox(NULL,"(3) Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||
PanicAlert("(3) Can't Set The PixelFormat.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(hRC = wglCreateContext(hDC))) {
|
||||
MessageBox(NULL,"(4) Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||
PanicAlert("(4) Can't Create A GL Rendering Context.");
|
||||
return false;
|
||||
}
|
||||
// --------------------------------------
|
||||
@ -395,16 +395,16 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
}
|
||||
else {
|
||||
GLWin.doubleBuffered = True;
|
||||
ERROR_LOG(VIDEO, "Got Doublebuffered Visual!\n");
|
||||
NOTICE_LOG(VIDEO, "Got Doublebuffered Visual!\n");
|
||||
}
|
||||
|
||||
glXQueryVersion(GLWin.dpy, &glxMajorVersion, &glxMinorVersion);
|
||||
ERROR_LOG(VIDEO, "glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
||||
NOTICE_LOG(VIDEO, "glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
||||
/* create a GLX context */
|
||||
GLWin.ctx = glXCreateContext(GLWin.dpy, vi, 0, GL_TRUE);
|
||||
if(!GLWin.ctx)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Couldn't Create GLX context.Quit");
|
||||
PanicAlert("Couldn't Create GLX context.Quit");
|
||||
exit(0); // TODO: Don't bring down entire Emu
|
||||
}
|
||||
/* create a color map */
|
||||
@ -426,7 +426,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
|
||||
// set best mode to current
|
||||
bestMode = 0;
|
||||
ERROR_LOG(VIDEO, "XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion);
|
||||
NOTICE_LOG(VIDEO, "XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion);
|
||||
XF86VidModeGetAllModeLines(GLWin.dpy, GLWin.screen, &modeNum, &modes);
|
||||
|
||||
if (modeNum > 0 && modes != NULL) {
|
||||
@ -443,7 +443,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
XF86VidModeSetViewPort(GLWin.dpy, GLWin.screen, 0, 0);
|
||||
dpyWidth = modes[bestMode]->hdisplay;
|
||||
dpyHeight = modes[bestMode]->vdisplay;
|
||||
ERROR_LOG(VIDEO, "Resolution %dx%d\n", dpyWidth, dpyHeight);
|
||||
NOTICE_LOG(VIDEO, "Resolution %dx%d\n", dpyWidth, dpyHeight);
|
||||
XFree(modes);
|
||||
|
||||
/* create a fullscreen window */
|
||||
@ -528,7 +528,7 @@ bool OpenGL_MakeCurrent()
|
||||
cocoaGLMakeCurrent(GLWin.cocoaCtx,GLWin.cocoaWin);
|
||||
#elif defined(_WIN32)
|
||||
if (!wglMakeCurrent(hDC,hRC)) {
|
||||
MessageBox(NULL,"(5) Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
|
||||
PanicAlert("(5) Can't Activate The GL Rendering Context.");
|
||||
return false;
|
||||
}
|
||||
#elif defined(USE_WX) && USE_WX
|
||||
@ -541,9 +541,9 @@ bool OpenGL_MakeCurrent()
|
||||
glXMakeCurrent(GLWin.dpy, GLWin.win, GLWin.ctx);
|
||||
XGetGeometry(GLWin.dpy, GLWin.win, &winDummy, &GLWin.x, &GLWin.y,
|
||||
&GLWin.width, &GLWin.height, &borderDummy, &GLWin.depth);
|
||||
ERROR_LOG(VIDEO, "GLWin Depth %d", GLWin.depth)
|
||||
NOTICE_LOG(VIDEO, "GLWin Depth %d", GLWin.depth)
|
||||
if (glXIsDirect(GLWin.dpy, GLWin.ctx)) {
|
||||
ERROR_LOG(VIDEO, "you have Direct Rendering!");
|
||||
NOTICE_LOG(VIDEO, "detected direct rendering");
|
||||
} else {
|
||||
ERROR_LOG(VIDEO, "no Direct Rendering possible!");
|
||||
}
|
||||
@ -708,7 +708,7 @@ void OpenGL_Shutdown()
|
||||
|
||||
if (!wglDeleteContext(hRC)) // Are We Able To Delete The RC?
|
||||
{
|
||||
MessageBox(NULL,"Release Rendering Context Failed.", "SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION);
|
||||
ERROR_LOG(VIDEO, "Release Rendering Context Failed.");
|
||||
}
|
||||
hRC = NULL; // Set RC To NULL
|
||||
}
|
||||
@ -716,7 +716,7 @@ void OpenGL_Shutdown()
|
||||
if (hDC && !ReleaseDC(EmuWindow::GetWnd(), hDC)) // Are We Able To Release The DC
|
||||
{
|
||||
#ifndef SETUP_TIMER_WAITING // This fails
|
||||
MessageBox(NULL,"Release Device Context Failed.", "SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION);
|
||||
ERROR_LOG(VIDEO, "Release Device Context Failed.");
|
||||
#endif
|
||||
hDC = NULL; // Set DC To NULL
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void PixelShaderCache::Init()
|
||||
int maxinst, maxattribs;
|
||||
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, (GLint *)&maxinst);
|
||||
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB, (GLint *)&maxattribs);
|
||||
ERROR_LOG(VIDEO, "pixel max_alu=%d, max_inst=%d, max_attrib=%d\n", s_nMaxPixelInstructions, maxinst, maxattribs);
|
||||
INFO_LOG(VIDEO, "pixel max_alu=%d, max_inst=%d, max_attrib=%d\n", s_nMaxPixelInstructions, maxinst, maxattribs);
|
||||
|
||||
char pmatrixprog[1024];
|
||||
sprintf(pmatrixprog, "!!ARBfp1.0"
|
||||
|
@ -41,11 +41,11 @@ X11Window::X11Window() : GLWindow() {
|
||||
ERROR_LOG("Only Singlebuffered Visual!\n");
|
||||
} else {
|
||||
doubleBuffered = True;
|
||||
ERROR_LOG("Got Doublebuffered Visual!\n");
|
||||
NOTICE_LOG("Got Doublebuffered Visual!\n");
|
||||
}
|
||||
|
||||
glXQueryVersion(dpy, &glxMajorVersion, &glxMinorVersion);
|
||||
ERROR_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
||||
NOTICE_LOG("glX-Version %d.%d\n", glxMajorVersion, glxMinorVersion);
|
||||
/* create a GLX context */
|
||||
ctx = glXCreateContext(dpy, vi, 0, GL_TRUE);
|
||||
if(!ctx) {
|
||||
@ -72,7 +72,7 @@ X11Window::X11Window() : GLWindow() {
|
||||
|
||||
// set best mode to current
|
||||
bestMode = 0;
|
||||
ERROR_LOG("XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion);
|
||||
NOTICE_LOG("XF86VidModeExtension-Version %d.%d\n", vidModeMajorVersion, vidModeMinorVersion);
|
||||
XF86VidModeGetAllModeLines(dpy, screen, &modeNum, &modes);
|
||||
|
||||
if (modeNum > 0 && modes != NULL) {
|
||||
@ -90,7 +90,7 @@ X11Window::X11Window() : GLWindow() {
|
||||
XF86VidModeSetViewPort(dpy, screen, 0, 0);
|
||||
dpyWidth = modes[bestMode]->hdisplay;
|
||||
dpyHeight = modes[bestMode]->vdisplay;
|
||||
ERROR_LOG("Resolution %dx%d\n", dpyWidth, dpyHeight);
|
||||
NOTICE_LOG("Resolution %dx%d\n", dpyWidth, dpyHeight);
|
||||
XFree(modes);
|
||||
|
||||
/* create a fullscreen window */
|
||||
@ -264,11 +264,11 @@ bool X11Window::MakeCurrent() {
|
||||
XGetGeometry(dpy, win, &winDummy, &x, &y,
|
||||
&w, &h, &borderDummy, &depth);
|
||||
|
||||
ERROR_LOG("GLWin Depth %d", depth);
|
||||
NOTICE_LOG("GLWin Depth %d", depth);
|
||||
if (glXIsDirect(dpy, ctx)) {
|
||||
ERROR_LOG("you have Direct Rendering!");
|
||||
} else {
|
||||
ERROR_LOG("no Direct Rendering possible!");
|
||||
NOTICE_LOG("no Direct Rendering possible!");
|
||||
}
|
||||
|
||||
// better for pad plugin key input (thc)
|
||||
|
Reference in New Issue
Block a user