Merge branch 'master' of github.com:hrydgard/ppsspp

This commit is contained in:
Daniel Dressler committed 2013-07-03 19:04:11 -07:00
commit 7b5e24cc09
24 files changed
+232 -66

No files matched your search

+1
View File
@@ -580,6 +580,7 @@ add_library(native STATIC
native/image/zim_save.h
native/input/gesture_detector.cpp
native/input/gesture_detector.h
native/input/input_state.cpp
native/input/keycodes.h
native/input/input_state.h
native/input/input_state.cpp
+2
View File
@@ -186,6 +186,7 @@
<ClInclude Include="FixedSizeQueue.h" />
<ClInclude Include="FixedSizeUnorderedSet.h" />
<ClInclude Include="Hash.h" />
<ClInclude Include="KeyMap.h" />
<ClInclude Include="LinearDiskCache.h" />
<ClInclude Include="Log.h" />
<ClInclude Include="LogManager.h" />
@@ -225,6 +226,7 @@
<ClCompile Include="FileSearch.cpp" />
<ClCompile Include="FileUtil.cpp" />
<ClCompile Include="Hash.cpp" />
<ClCompile Include="KeyMap.cpp" />
<ClCompile Include="LogManager.cpp" />
<ClCompile Include="MathUtil.cpp" />
<ClCompile Include="MemArena.cpp" />
+2
View File
@@ -46,6 +46,7 @@
<ClInclude Include="Crypto\md5.h">
<Filter>Crypto</Filter>
</ClInclude>
<ClInclude Include="KeyMap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp" />
@@ -76,6 +77,7 @@
<ClCompile Include="Crypto\md5.cpp">
<Filter>Crypto</Filter>
</ClCompile>
<ClCompile Include="KeyMap.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
+1 -1
View File
@@ -16,7 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "input/input_state.h"
#include "Core/Config.h"
#include "../Core/Config.h"
#include "KeyMap.h"
using namespace KeyMap;
+1 -1
View File
@@ -20,7 +20,7 @@
#include <string>
#include <map>
#include "input/keycodes.h" // keyboard keys
#include "Core/HLE/sceCtrl.h" // psp keys
#include "../Core/HLE/sceCtrl.h" // psp keys
#define KEYMAP_ERROR_KEY_ALREADY_USED -1
#define KEYMAP_ERROR_UNKNOWN_KEY 0
+1 -1
View File
@@ -181,7 +181,7 @@ void PSPMsgDialog::DisplayMessage(std::string text, bool hasYesNo)
I18NCategory *d = GetI18NCategory("Dialog");
float x, w;
x = 240.0f;
w = w / 2.0f + 16.0f;
w = 15.0f;
h /= 2.0f;
float y2 = y + h2 + 10.0f;
h2 += h + 4.0f;
+1 -1
View File
@@ -17,7 +17,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "../Common/CommonTypes.h"
class PointerWrap;
+4 -3
View File
@@ -126,7 +126,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
// Set cull
bool wantCull = !gstate.isModeClear() && !gstate.isModeThrough() && prim != GE_PRIM_RECTANGLES && gstate.isCullEnabled();
glstate.cullFace.set(wantCull);
if (wantCull)
if (wantCull)
glstate.cullFaceMode.set(cullingMode[gstate.getCullMode()]);
// TODO: The top bit of the alpha channel should be written to the stencil bit somehow. This appears to require very expensive multipass rendering :( Alternatively, one could do a
@@ -234,12 +234,13 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
glstate.colorMask.set(colorMask, colorMask, colorMask, alphaMask);
// Stencil Test
if (gstate.isStencilTestEnabled()) {
if (alphaMask) {
glstate.stencilTest.enable();
glstate.stencilOp.set(GL_REPLACE, GL_REPLACE, GL_REPLACE);
glstate.stencilFunc.set(GL_ALWAYS, 0, 0xFF);
} else
} else {
glstate.stencilTest.disable();
}
} else {
+16 -18
View File
@@ -979,13 +979,7 @@ void TextureCache::SetTexture() {
// Check for FBO - slow!
if (entry->framebuffer) {
entry->framebuffer->usageFlags |= FB_USAGE_TEXTURE;
if (!g_Config.bBufferedRendering) {
if (entry->framebuffer->fbo)
entry->framebuffer->fbo = 0;
glBindTexture(GL_TEXTURE_2D, 0);
lastBoundTexture = -1;
entry->lastFrame = gpuStats.numFrames;
} else {
if (g_Config.bBufferedRendering) {
if (entry->framebuffer->fbo) {
fbo_bind_color_as_texture(entry->framebuffer->fbo, 0);
} else {
@@ -994,19 +988,23 @@ void TextureCache::SetTexture() {
gstate_c.skipDrawReason |= SKIPDRAW_BAD_FB_TEXTURE;
}
UpdateSamplingParams(*entry, false);
// This isn't right.
gstate_c.curTextureWidth = entry->framebuffer->width;
gstate_c.curTextureHeight = entry->framebuffer->height;
gstate_c.flipTexture = true;
gstate_c.textureFullAlpha = entry->framebuffer->format == GE_FORMAT_565;
entry->lastFrame = gpuStats.numFrames;
return;
} else {
if (entry->framebuffer->fbo)
entry->framebuffer->fbo = 0;
glBindTexture(GL_TEXTURE_2D, 0);
lastBoundTexture = -1;
entry->lastFrame = gpuStats.numFrames;
}
// This isn't right.
gstate_c.curTextureWidth = entry->framebuffer->width;
gstate_c.curTextureHeight = entry->framebuffer->height;
int h = 1 << ((gstate.texsize[0] >> 8) & 0xf);
gstate_c.actualTextureHeight = h;
gstate_c.flipTexture = true;
gstate_c.textureFullAlpha = entry->framebuffer->format == GE_FORMAT_565;
entry->lastFrame = gpuStats.numFrames;
return;
}
//Validate the texture here (width, height etc)
// Validate the texture here (width, height etc)
int dim = gstate.texsize[0] & 0xF0F;
bool match = entry->Matches(dim, format, maxLevel);
+2
View File
@@ -37,6 +37,7 @@ SOURCES += ../Common/ColorUtil.cpp \
../Common/FileUtil.cpp \
../Common/Hash.cpp \
../Common/LogManager.cpp \
../Common/KeyMap.cpp \
../Common/MathUtil.cpp \
../Common/MemArena.cpp \
../Common/MemoryUtil.cpp \
@@ -56,6 +57,7 @@ HEADERS += ../Common/ChunkFile.h \
../Common/FileUtil.h \
../Common/Hash.h \
../Common/LogManager.h \
../Common/KeyMap.h \
../Common/MathUtil.h \
../Common/MemArena.h \
../Common/MemoryUtil.h \
+2
View File
@@ -34,6 +34,8 @@ linux {
DEFINES += QT_HAS_SDL
PKGCONFIG += sdl
}
FFMPEG_DIR=../ffmpeg/linux/x86_64/lib/
LIBS += $${FFMPEG_DIR}libavformat.a $${FFMPEG_DIR}libavcodec.a $${FFMPEG_DIR}libavutil.a $${FFMPEG_DIR}libswresample.a $${FFMPEG_DIR}libswscale.a
}
}
+4
View File
@@ -35,6 +35,10 @@ contains(MEEGO_EDITION,harmattan)|!count(gleslib,0) {
# Platform specific
contains(MEEGO_EDITION,harmattan): DEFINES += MEEGO_EDITION_HARMATTAN "_SYS_UCONTEXT_H=1"
linux:!mobile_platform: {
DEFINES += USE_FFMPEG
INCLUDEPATH += ../ffmpeg/linux/x86_64/include
}
qnx {
# Use mkspec: unsupported/qws/qnx-armv7-g++
DEFINES += BLACKBERRY "_QNX_SOURCE=1" "_C99=1"
+106 -26
View File
@@ -839,6 +839,7 @@ void GraphicsScreenP1::render() {
bool Vsync = g_Config.iVSyncInterval != 0;
UICheckBox(GEN_ID, x, y += stride, gs->T("VSync"), ALIGN_TOPLEFT, &Vsync);
g_Config.iVSyncInterval = Vsync ? 1 : 0;
UICheckBox(GEN_ID, x, y += stride, gs->T("Fullscreen"), ALIGN_TOPLEFT, &g_Config.bFullScreen);
#endif
UICheckBox(GEN_ID, x, y += stride, gs->T("Display Raw Framebuffer"), ALIGN_TOPLEFT, &g_Config.bDisplayFramebuffer);
if (UICheckBox(GEN_ID, x, y += stride, gs->T("Buffered Rendering"), ALIGN_TOPLEFT, &g_Config.bBufferedRendering)) {
@@ -846,7 +847,13 @@ void GraphicsScreenP1::render() {
gpu->Resized();
}
if (g_Config.bBufferedRendering) {
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("AA", "Anti Aliasing"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
bool memory = !g_Config.bFramebuffersToMem;
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("Skip updating PSP Memory"), ALIGN_TOPLEFT, &memory)) {
if (gpu)
gpu->Resized();
}
g_Config.bFramebuffersToMem = memory ? 0 : 1;
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("AA", "Anti-aliasing"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
if (gpu)
gpu->Resized();
}
@@ -1255,27 +1262,45 @@ void SystemScreen::render() {
UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);
bool LockCPUSpeed = g_Config.iLockedCPUSpeed != 0;
UICheckBox(GEN_ID, x, y += stride, s->T("Lock PSP CPU Speed"), ALIGN_TOPLEFT, &LockCPUSpeed);
UICheckBox(GEN_ID, x, y += stride, s->T("Unlock CPU Speed"), ALIGN_TOPLEFT, &LockCPUSpeed);
if(LockCPUSpeed) {
if(g_Config.iLockedCPUSpeed <= 0)
g_Config.iLockedCPUSpeed = 222;
char showCPUSpeed[256];
sprintf(showCPUSpeed, "%s %d", s->T("Locked CPU Speed:"), g_Config.iLockedCPUSpeed);
sprintf(showCPUSpeed, "%s %d", s->T("Clock: "), g_Config.iLockedCPUSpeed);
ui_draw2d.DrawText(UBUNTU24, showCPUSpeed, x + 60, (y += stride) - 5, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 250, y, 20);
if (UIButton(GEN_ID, hlinear1, 80, 0, s->T("Auto"), ALIGN_LEFT))
g_Config.iLockedCPUSpeed = 333;
if (UIButton(GEN_ID, hlinear1, 40, 0, s->T("-"), ALIGN_LEFT))
if (g_Config.iLockedCPUSpeed > 111)
g_Config.iLockedCPUSpeed -= 111;
if (UIButton(GEN_ID, hlinear1, 40, 0, s->T("+"), ALIGN_LEFT))
if (g_Config.iLockedCPUSpeed < 666)
g_Config.iLockedCPUSpeed += 111;
y += 20;
}
else {
else
g_Config.iLockedCPUSpeed = 0;
UICheckBox(GEN_ID, x, y += stride, s->T("Enable Cheats"), ALIGN_TOPLEFT, &g_Config.bEnableCheats);
if (g_Config.bEnableCheats) {
HLinear hlinear1(x + 60, y += stride + 10, 20);
if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH + 50, 0, s->T("Reload Cheats"), ALIGN_TOPLEFT))
g_Config.bReloadCheats = true;
y += 10;
}
//UICheckBox(GEN_ID, x, y += stride, s->T("Daylight Savings"), ALIGN_TOPLEFT, &g_Config.bDayLightSavings);
y += 20;
const char *buttonPreferenceTitle;
switch (g_Config.iButtonPreference) {
case PSP_SYSTEMPARAM_BUTTON_CIRCLE:
buttonPreferenceTitle = s->T("Button Preference - O to Confirm");
buttonPreferenceTitle = s->T("Button Pref : O to Confirm");
break;
case PSP_SYSTEMPARAM_BUTTON_CROSS:
default:
buttonPreferenceTitle = s->T("Button Preference - X to Confirm");
buttonPreferenceTitle = s->T("Button Pref : X to Confirm");
break;
}
@@ -1284,15 +1309,55 @@ void SystemScreen::render() {
#else
const int checkboxH = 48;
#endif
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x + UI_SPACE + 29, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
y += stride;
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
// 29 is the width of the checkbox, new UI will replace.
HLinear hlinearButtonPref(x + UI_SPACE + 29, y, 20);
HLinear hlinearButtonPref(x + 400, y, 20);
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use O"), ALIGN_LEFT))
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CIRCLE;
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use X"), ALIGN_LEFT))
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CROSS;
y += 20 + 6;
y += 20;
char recents[256];
sprintf(recents, "%s %i", s->T("Max. No of Recents :"), g_Config.iMaxRecent);
ui_draw2d.DrawText(UBUNTU24, recents, x, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear2(x + 400, y, 20);
if (UIButton(GEN_ID, hlinear2, 50, 0, s->T("-1"), ALIGN_LEFT))
if (g_Config.iMaxRecent > 4)
g_Config.iMaxRecent -= 1;
if (UIButton(GEN_ID, hlinear2, 50, 0, s->T("+1"), ALIGN_LEFT))
if (g_Config.iMaxRecent < 40)
g_Config.iMaxRecent += 1;
if (UIButton(GEN_ID, hlinear2, 80, 0, s->T("Clear"), ALIGN_LEFT)) {
g_Config.recentIsos.clear();
}
y += 20;
char lang[256];
std::string type;
switch (g_Config.ilanguage) {
case 0: type = "日本語";break;
case 1: type = "English";break;
case 2: type = "Français";break;
case 3: type = "Castellano";break;
case 4: type = "Deutsch";break;
case 5: type = "Italiano";break;
case 6: type = "Nederlands";break;
case 7: type = "Português";break;
case 8: type = "한국어";break;
case 9: type = "Русский";break;
case 10: type = "繁體中文";break;
case 11: type = "简体中文";break;
}
sprintf(lang, "%s %s", s->T("System Language :"), type.c_str());
ui_draw2d.DrawText(UBUNTU24, lang, x, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear3(x + 400, y, 20);
if (UIButton(GEN_ID, hlinear3, LARGE_BUTTON_WIDTH, 0, s->T("Language"), ALIGN_TOPLEFT)) {
screenManager()->push(new LanguageScreen());
}
/*
bool time = g_Config.iTimeFormat > 0 ;
@@ -1344,20 +1409,6 @@ void SystemScreen::render() {
g_Config.iDateFormat = 0;
*/
#ifndef ANDROID
UICheckBox(GEN_ID, x, y += stride, s->T("Enable Cheats"), ALIGN_TOPLEFT, &g_Config.bEnableCheats);
if (g_Config.bEnableCheats) {
HLinear hlinear1(x + 60, y += stride + 10, 20);
if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH + 50, 0, s->T("Reload Cheats"), ALIGN_TOPLEFT))
g_Config.bReloadCheats = true;
y += 10;
}
#endif
HLinear hlinear2(x, y += stride + 10, 20);
if (UIButton(GEN_ID, hlinear2, LARGE_BUTTON_WIDTH, 0, s->T("Language"), ALIGN_TOPLEFT)) {
screenManager()->push(new LanguageScreen());
}
UIEnd();
}
@@ -1386,7 +1437,36 @@ void ControlsScreen::render() {
UICheckBox(GEN_ID, x, y += stride, c->T("OnScreen", "On-Screen Touch Controls"), ALIGN_TOPLEFT, &g_Config.bShowTouchControls);
UICheckBox(GEN_ID, x, y += stride, c->T("Tilt", "Tilt to Analog (horizontal)"), ALIGN_TOPLEFT, &g_Config.bAccelerometerToAnalogHoriz);
if (g_Config.bShowTouchControls) {
UICheckBox(GEN_ID, x, y += stride, c->T("Show Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
UICheckBox(GEN_ID, x, y += stride, c->T("Show Left Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
bool rightstick = g_Config.iRightStickBind > 0;
UICheckBox(GEN_ID, x, y += stride, c->T("Bind Right Analog Stick"), ALIGN_TOPLEFT, &rightstick);
if (rightstick) {
if (g_Config.iRightStickBind <= 0 )
g_Config.iRightStickBind = 1;
char showType[256];
std::string type;
switch (g_Config.iRightStickBind) {
case 1: type = "Arrow Buttons";break;
case 2: type = "Face Buttons";break;
case 3: type = "L/R";break;
case 4: type = "L/R + Triangle/Cross";break;
}
sprintf(showType, "%s %s", c->T("Target :"), type.c_str());
ui_draw2d.DrawText(UBUNTU24, showType, x + 60, (y += stride) , 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 60 , y+= stride + 5, 10);
if (UIButton(GEN_ID, hlinear1, 200, 0, c->T("Arrow Buttons"), ALIGN_LEFT))
g_Config.iRightStickBind = 1;
if (UIButton(GEN_ID, hlinear1, 200, 0, c->T("Face Buttons"), ALIGN_LEFT))
g_Config.iRightStickBind = 2;
if (UIButton(GEN_ID, hlinear1, 60, 0, c->T("L/R"), ALIGN_LEFT))
g_Config.iRightStickBind = 3;
if (UIButton(GEN_ID, hlinear1, 280, 0, c->T("L/R + Triangle/Cross"), ALIGN_LEFT))
g_Config.iRightStickBind = 4;
y += 20;
} else
g_Config.iRightStickBind = 0;
UICheckBox(GEN_ID, x, y += stride, c->T("Buttons Scaling"), ALIGN_TOPLEFT, &g_Config.bLargeControls);
if (g_Config.bLargeControls) {
char scale[256];
+3 -1
View File
@@ -8,7 +8,9 @@ enum { WM_DEB_RUNTOWPARAM = WM_USER+2,
WM_DEB_REMOVEBREAKPOINT,
WM_DEB_GOTOADDRESSEDIT,
WM_DEB_MAPLOADED,
WM_DEB_TABPRESSED
WM_DEB_TABPRESSED,
WM_DEB_SETDEBUGLPARAM,
WM_DEB_UPDATE,
};
bool executeExpressionWindow(HWND hwnd, DebugInterface* cpu, u32& dest);
+31 -2
View File
@@ -558,6 +558,10 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
ptr->gotoPC();
UpdateDialog();
vfpudlg->Update();
CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW))->redraw();
threadList->reloadThreads();
updateThreadLabel(false);
}
break;
@@ -575,7 +579,7 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
ptr->setDontRedraw(true);
u32 breakpointAddress = cpu->GetPC()+cpu->getInstructionSize(0);
if (memcmp(dis,"jal\t",4) == 0)
if (memcmp(dis,"jal\t",4) == 0 || memcmp(dis,"jalr\t",5) == 0)
{
// it's a function call with a delay slot - skip that too
breakpointAddress += cpu->getInstructionSize(0);
@@ -784,9 +788,14 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
}
break;
case WM_DISASM_SETDEBUG:
case WM_DEB_SETDEBUGLPARAM:
SetDebugMode(lParam != 0);
return TRUE;
case WM_DEB_UPDATE:
Update();
return TRUE;
case WM_DEB_TABPRESSED:
{
HWND bp = GetDlgItem(m_hDlg, IDC_BREAKPOINTLIST);
@@ -839,6 +848,19 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
return FALSE;
}
void CDisasm::updateThreadLabel(bool clear)
{
char label[512];
if (clear)
{
sprintf(label,"Thread: -");
} else {
sprintf(label,"Thread: %s",threadList->getCurrentThreadName());
}
SetDlgItemText(m_hDlg, IDC_THREADNAME,label);
}
void CDisasm::UpdateSize(WORD width, WORD height)
{
HWND disasm = GetDlgItem(m_hDlg, IDC_DISASMVIEW);
@@ -900,6 +922,7 @@ void CDisasm::SetDebugMode(bool _bDebug)
CBreakPoints::ClearTemporaryBreakPoints();
updateBreakpointList();
threadList->reloadThreads();
updateThreadLabel(false);
EnableWindow( GetDlgItem(hDlg, IDC_GO), TRUE);
EnableWindow( GetDlgItem(hDlg, IDC_STEP), TRUE);
@@ -910,12 +933,18 @@ void CDisasm::SetDebugMode(bool _bDebug)
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
ptr->setDontRedraw(false);
ptr->gotoPC();
CtrlMemView *mem = CtrlMemView::getFrom(GetDlgItem(m_hDlg,IDC_DEBUGMEMVIEW));
mem->redraw();
// update the callstack
//CDisam::blah blah
UpdateDialog();
}
else
{
updateThreadLabel(true);
EnableWindow( GetDlgItem(hDlg, IDC_GO), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STEP), FALSE);
EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), FALSE);
+1 -3
View File
@@ -14,9 +14,6 @@
#include <windows.h>
// Takes lParam for debug mode, zero or non zero.
const int WM_DISASM_SETDEBUG = WM_APP + 0;
class CtrlThreadList;
class CDisasm : public Dialog
@@ -44,6 +41,7 @@ private:
void removeBreakpoint(int itemIndex);
int getTotalBreakpointCount();
int getBreakpointIndex(int itemIndex, bool& isMemory);
void updateThreadLabel(bool clear);
public:
int index; //helper
+34 -2
View File
@@ -83,7 +83,20 @@ void CtrlThreadList::handleNotify(LPARAM lParam)
if (mhdr->code == NM_DBLCLK)
{
LPNMITEMACTIVATE item = (LPNMITEMACTIVATE) lParam;
SendMessage(GetParent(wnd),WM_DEB_GOTOWPARAM,threads[item->iItem].curPC,0);
u32 address;
switch (threads[item->iItem].status)
{
case THREADSTATUS_DORMANT:
case THREADSTATUS_DEAD:
address = threads[item->iItem].entrypoint;
break;
default:
address = threads[item->iItem].curPC;
break;
}
SendMessage(GetParent(wnd),WM_DEB_GOTOWPARAM,address,0);
return;
}
@@ -99,7 +112,16 @@ void CtrlThreadList::handleNotify(LPARAM lParam)
strcpy(stringBuffer,threads[index].name);
break;
case TL_PROGRAMCOUNTER:
sprintf(stringBuffer,"0x%08X",threads[index].curPC);
switch (threads[index].status)
{
case THREADSTATUS_DORMANT:
case THREADSTATUS_DEAD:
sprintf(stringBuffer,"N/A");
break;
default:
sprintf(stringBuffer,"0x%08X",threads[index].curPC);
break;
};
break;
case TL_ENTRYPOINT:
sprintf(stringBuffer,"0x%08X",threads[index].entrypoint);
@@ -168,3 +190,13 @@ void CtrlThreadList::reloadThreads()
InvalidateRect(wnd,NULL,true);
UpdateWindow(wnd);
}
const char* CtrlThreadList::getCurrentThreadName()
{
for (int i = 0; i < threads.size(); i++)
{
if (threads[i].isCurrent) return threads[i].name;
}
return "N/A";
}
+1
View File
@@ -15,4 +15,5 @@ public:
void reloadThreads();
void handleNotify(LPARAM lParam);
static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
const char* getCurrentThreadName();
};
+5
View File
@@ -177,6 +177,11 @@ BOOL CMemoryDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
}
break;
}
case WM_DEB_UPDATE:
Update();
return TRUE;
case WM_INITDIALOG:
{
return TRUE;
+12 -6
View File
@@ -25,9 +25,10 @@
#include "WndMainWindow.h"
#include "OpenGLBase.h"
#include "../Windows/Debugger/Debugger_Disasm.h"
#include "../Windows/Debugger/Debugger_MemoryDlg.h"
#include "../Core/Debugger/SymbolMap.h"
#include "Windows/Debugger/DebuggerShared.h"
#include "Windows/Debugger/Debugger_Disasm.h"
#include "Windows/Debugger/Debugger_MemoryDlg.h"
#include "Core/Debugger/SymbolMap.h"
#include "main.h"
@@ -45,6 +46,11 @@ int MyMix(short *buffer, int numSamples, int bits, int rate, int channels)
}
}
static BOOL PostDialogMessage(Dialog *dialog, UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
{
return PostMessage(dialog->GetDlgHandle(), message, wParam, lParam);
}
bool WindowsHost::InitGL(std::string *error_message)
{
return GL_Init(MainWindow::GetDisplayHWND(), error_message);
@@ -112,14 +118,14 @@ void WindowsHost::UpdateMemView()
{
for (int i=0; i<numCPUs; i++)
if (memoryWindow[i])
memoryWindow[i]->Update();
PostDialogMessage(memoryWindow[i], WM_DEB_UPDATE);
}
void WindowsHost::UpdateDisassembly()
{
for (int i=0; i<numCPUs; i++)
if (disasmWindow[i])
disasmWindow[i]->Update();
PostDialogMessage(disasmWindow[i], WM_DEB_UPDATE);
}
void WindowsHost::SetDebugMode(bool mode)
@@ -127,7 +133,7 @@ void WindowsHost::SetDebugMode(bool mode)
for (int i = 0; i < numCPUs; i++)
{
if (disasmWindow[i])
PostMessage(disasmWindow[i]->GetDlgHandle(), WM_DISASM_SETDEBUG, 0, (LPARAM)mode);
PostDialogMessage(disasmWindow[i], WM_DEB_SETDEBUGLPARAM, 0, (LPARAM)mode);
}
}
BIN
View File
Binary file not shown.
Binary file not shown.
+1
View File
@@ -152,6 +152,7 @@ LOCAL_SRC_FILES := \
$(SRC)/ext/snappy/snappy.cpp \
$(SRC)/ext/xbrz/xbrz.cpp \
$(SRC)/Common/Crypto/md5.cpp \
$(SRC)/Common/KeyMap.cpp \
$(SRC)/Common/LogManager.cpp \
$(SRC)/Common/MemArena.cpp \
$(SRC)/Common/MemoryUtil.cpp \
+1 -1
Submodule native updated: d28b58a203...3db24e97c1.