mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Added the StretchToFit option to the config menu in the OpenGL plugin. This fixes the blackness in SSBM. I also added a keep aspect ratio option, it will keep your aspect ratio at 4:3, but then SSBM will have the blackness problem again. You find the options under the Enhancements window in the OpenGL configuration.
I also added a wx debugging window for the OpenGL plugin. I connected it to the old console window that was in the plugin. Other than that it doesn't do anything at the moment but it could be useful to show all the current important information and parameter statuses and so on. Again there's a problem with wx windows collisions. Show() can't be used because then DLL_PROCESS_DETACH is called immediately after the window is opened, and if we open it with ShowModal() before we have loaded a game the main video window will be blocked. And we can't pass on any variables from a DllDebugger() that is called when Dolphin is started because the dll is reloaded and lose all variables sometime before a game is loaded. So we can't auto open the window that way. So I made the debugging window open as a game is loaded if it is enabled in the ini, the downside is that the ini setting will open the window even if we are not opening Dolphin with the -d flag. However, this will only affect people that have used the debugger at least once so in my opinion this is the most convenient solution. But feel free to come up with a better solution. Preferably some solution to how to use Show() and preventing DLL_PROCESS_DETACH to be called. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@812 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -36,13 +36,39 @@
|
||||
#include "VertexLoader.h"
|
||||
#include "PixelShaderManager.h"
|
||||
#include "VertexShaderManager.h"
|
||||
|
||||
#include "VideoState.h"
|
||||
#include "Debugger/Debugger.h" // for the CDebugger class
|
||||
|
||||
SVideoInitialize g_VideoInitialize;
|
||||
#define VERSION_STRING "0.1"
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// Create debugging window. We can't use Show() here as usual because then DLL_PROCESS_DETACH will
|
||||
// be called immediately. And if we use ShowModal() we block the main video window from appearing.
|
||||
// So I've made a separate function called DoDllDebugger() that creates the window.
|
||||
// -------------------
|
||||
CDebugger* m_frame;
|
||||
void DllDebugger(HWND _hParent)
|
||||
{
|
||||
if(m_frame) // if we have created it, let us show it again
|
||||
{
|
||||
m_frame->Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox(_T("The debugging window will open after you start a game."));
|
||||
}
|
||||
}
|
||||
|
||||
void DoDllDebugger()
|
||||
{
|
||||
m_frame = new CDebugger(NULL);
|
||||
m_frame->Show();
|
||||
}
|
||||
// ===================
|
||||
|
||||
|
||||
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
|
||||
{
|
||||
_PluginInfo->Version = 0x0100;
|
||||
@ -165,9 +191,9 @@ void Video_Initialize(SVideoInitialize* _pVideoInitialize)
|
||||
_pVideoInitialize->pWindowHandle = g_VideoInitialize.pWindowHandle;
|
||||
|
||||
Renderer::AddMessage("Dolphin OpenGL Video Plugin v" VERSION_STRING ,5000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Video_DoState(unsigned char **ptr, int mode) {
|
||||
|
||||
// Clear all caches
|
||||
@ -178,6 +204,9 @@ void Video_DoState(unsigned char **ptr, int mode) {
|
||||
//PanicAlert("Saving/Loading state from OpenGL");
|
||||
}
|
||||
|
||||
// =======================================================================================
|
||||
// This is run after Video_Initialize() from the Core
|
||||
// --------------
|
||||
void Video_Prepare(void)
|
||||
{
|
||||
OpenGL_MakeCurrent();
|
||||
@ -197,6 +226,7 @@ void Video_Prepare(void)
|
||||
PixelShaderMngr::Init();
|
||||
GL_REPORT_ERRORD();
|
||||
}
|
||||
// ==============
|
||||
|
||||
|
||||
void Video_Shutdown(void)
|
||||
@ -224,7 +254,7 @@ void Video_EnterLoop()
|
||||
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
|
||||
char* Msg = (char*)alloca(strlen(_fmt)+512);
|
||||
va_list ap;
|
||||
|
Reference in New Issue
Block a user