Move more stuff out of Globals.h in gl plugin. Changed gl plugin precompiled header to a new stdafx.h, you may have to Build->Clean after updating to this rev.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@940 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-10-22 21:23:40 +00:00
parent 85781409e4
commit 4b2c7310b7
19 changed files with 283 additions and 384 deletions

View File

@ -28,6 +28,7 @@
#include <mmsystem.h>
#endif
#include "Config.h"
#include "Profiler.h"
#include "Statistics.h"
#include "ImageWrite.h"
@ -384,7 +385,7 @@ void Renderer::ProcessMessages()
if (s_listMsgs.size() > 0) {
int left = 25, top = 15;
list<MESSAGE>::iterator it = s_listMsgs.begin();
std::list<MESSAGE>::iterator it = s_listMsgs.begin();
while (it != s_listMsgs.end())
{
int time_left = (int)(it->dwTimeStamp - timeGetTime());
@ -838,14 +839,14 @@ void Renderer::SwapBuffers()
bool Renderer::SaveRenderTarget(const char* filename, int jpeg)
{
bool bflip = true;
vector<u32> data(nBackbufferWidth*nBackbufferHeight);
std::vector<u32> data(nBackbufferWidth*nBackbufferHeight);
glReadPixels(0, 0, nBackbufferWidth, nBackbufferHeight, GL_BGRA, GL_UNSIGNED_BYTE, &data[0]);
if (glGetError() != GL_NO_ERROR)
return false;
if (bflip) {
// swap scanlines
vector<u32> scanline(nBackbufferWidth);
std::vector<u32> scanline(nBackbufferWidth);
for(int i = 0; i < nBackbufferHeight/2; ++i) {
memcpy(&scanline[0], &data[i*nBackbufferWidth], nBackbufferWidth*4);
memcpy(&data[i*nBackbufferWidth], &data[(nBackbufferHeight-i-1)*nBackbufferWidth], nBackbufferWidth*4);