Global: Remove some unused variables.

This commit is contained in:
Unknown W. Brackets 2021-02-15 09:28:07 -08:00
parent 0c876754a6
commit f32f89dd90
74 changed files with 28 additions and 170 deletions

View File

@ -3833,8 +3833,6 @@ bool ARM64XEmitter::TryEORI2R(ARM64Reg Rd, ARM64Reg Rn, u64 imm) {
} }
float FPImm8ToFloat(uint8_t bits) { float FPImm8ToFloat(uint8_t bits) {
int E = 8;
int F = 32 - 8 - 1;
int sign = bits >> 7; int sign = bits >> 7;
uint32_t f = 0; uint32_t f = 0;
f |= (sign << 31); f |= (sign << 31);

View File

@ -114,6 +114,7 @@ CPUInfo::CPUInfo() {
Detect(); Detect();
} }
#if PPSSPP_PLATFORM(LINUX)
static std::vector<int> ParseCPUList(const std::string &filename) { static std::vector<int> ParseCPUList(const std::string &filename) {
std::string data; std::string data;
std::vector<int> results; std::vector<int> results;
@ -135,6 +136,7 @@ static std::vector<int> ParseCPUList(const std::string &filename) {
return results; return results;
} }
#endif
// Detects the various cpu features // Detects the various cpu features
void CPUInfo::Detect() { void CPUInfo::Detect() {

View File

@ -517,8 +517,6 @@ void ConsoleListener::PixelSpace(int Left, int Top, int Width, int Height, bool
// Check size // Check size
if (Width < 8 || Height < 12) return; if (Width < 8 || Height < 12) return;
bool DBef = true;
bool DAft = true;
std::string SLog = ""; std::string SLog = "";
// Get console info // Get console info

View File

@ -1023,7 +1023,6 @@ Pipeline *D3D11DrawContext::CreateGraphicsPipeline(const PipelineDesc &desc) {
// Can finally create the input layout // Can finally create the input layout
if (dPipeline->input) { if (dPipeline->input) {
auto &inputDesc = dPipeline->input->desc;
const std::vector<D3D11_INPUT_ELEMENT_DESC> &elements = dPipeline->input->elements; const std::vector<D3D11_INPUT_ELEMENT_DESC> &elements = dPipeline->input->elements;
HRESULT hr = device_->CreateInputLayout(elements.data(), (UINT)elements.size(), vshader->byteCode_.data(), vshader->byteCode_.size(), &dPipeline->il); HRESULT hr = device_->CreateInputLayout(elements.data(), (UINT)elements.size(), vshader->byteCode_.data(), vshader->byteCode_.size(), &dPipeline->il);
if (!SUCCEEDED(hr)) { if (!SUCCEEDED(hr)) {
@ -1488,7 +1487,6 @@ bool D3D11DrawContext::CopyFramebufferToMemorySync(Framebuffer *src, int channel
packDesc.MipLevels = 1; packDesc.MipLevels = 1;
packDesc.Usage = D3D11_USAGE_STAGING; packDesc.Usage = D3D11_USAGE_STAGING;
packDesc.SampleDesc.Count = 1; packDesc.SampleDesc.Count = 1;
D3D11_BOX srcBox{ (UINT)bx, (UINT)by, 0, (UINT)(bx + bw), (UINT)(by + bh), 1 };
switch (channelBits) { switch (channelBits) {
case FB_COLOR_BIT: case FB_COLOR_BIT:
packDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; // TODO: fb->colorFormat; packDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; // TODO: fb->colorFormat;

View File

@ -271,7 +271,7 @@ private:
class D3D9Pipeline : public Pipeline { class D3D9Pipeline : public Pipeline {
public: public:
D3D9Pipeline(LPDIRECT3DDEVICE9 device) : device_(device) {} D3D9Pipeline() {}
~D3D9Pipeline() { ~D3D9Pipeline() {
if (depthStencil) depthStencil->Release(); if (depthStencil) depthStencil->Release();
if (blend) blend->Release(); if (blend) blend->Release();
@ -294,8 +294,6 @@ public:
UniformBufferDesc dynamicUniforms; UniformBufferDesc dynamicUniforms;
void Apply(LPDIRECT3DDEVICE9 device); void Apply(LPDIRECT3DDEVICE9 device);
private:
LPDIRECT3DDEVICE9 device_;
}; };
class D3D9Texture : public Texture { class D3D9Texture : public Texture {
@ -695,7 +693,7 @@ Pipeline *D3D9Context::CreateGraphicsPipeline(const PipelineDesc &desc) {
ERROR_LOG(G3D, "Pipeline requires at least one shader"); ERROR_LOG(G3D, "Pipeline requires at least one shader");
return NULL; return NULL;
} }
D3D9Pipeline *pipeline = new D3D9Pipeline(device_); D3D9Pipeline *pipeline = new D3D9Pipeline();
for (auto iter : desc.shaders) { for (auto iter : desc.shaders) {
if (!iter) { if (!iter) {
ERROR_LOG(G3D, "NULL shader passed to CreateGraphicsPipeline"); ERROR_LOG(G3D, "NULL shader passed to CreateGraphicsPipeline");
@ -971,9 +969,6 @@ void D3D9Context::Draw(int vertexCount, int offset) {
} }
void D3D9Context::DrawIndexed(int vertexCount, int offset) { void D3D9Context::DrawIndexed(int vertexCount, int offset) {
D3D9Buffer *vbuf = static_cast<D3D9Buffer *>(curVBuffers_[0]);
D3D9Buffer *ibuf = static_cast<D3D9Buffer *>(curIBuffer_);
curPipeline_->Apply(device_); curPipeline_->Apply(device_);
curPipeline_->inputLayout->Apply(device_); curPipeline_->inputLayout->Apply(device_);
device_->SetStreamSource(0, curVBuffers_[0]->vbuffer_, curVBufferOffsets_[0], curPipeline_->inputLayout->GetStride(0)); device_->SetStreamSource(0, curVBuffers_[0]->vbuffer_, curVBufferOffsets_[0], curPipeline_->inputLayout->GetStride(0));
@ -1032,7 +1027,6 @@ void D3D9Context::SetStencilRef(uint8_t ref) {
bool D3D9ShaderModule::Compile(LPDIRECT3DDEVICE9 device, const uint8_t *data, size_t size) { bool D3D9ShaderModule::Compile(LPDIRECT3DDEVICE9 device, const uint8_t *data, size_t size) {
LPD3D_SHADER_MACRO defines = nullptr; LPD3D_SHADER_MACRO defines = nullptr;
LPD3DINCLUDE includes = nullptr; LPD3DINCLUDE includes = nullptr;
DWORD flags = 0;
LPD3DBLOB codeBuffer = nullptr; LPD3DBLOB codeBuffer = nullptr;
LPD3DBLOB errorBuffer = nullptr; LPD3DBLOB errorBuffer = nullptr;
const char *source = (const char *)data; const char *source = (const char *)data;

View File

@ -1001,7 +1001,6 @@ bool VulkanContext::InitSwapchain() {
std::string currentTransform = surface_transforms_to_string(surfCapabilities_.currentTransform); std::string currentTransform = surface_transforms_to_string(surfCapabilities_.currentTransform);
g_display_rotation = DisplayRotation::ROTATE_0; g_display_rotation = DisplayRotation::ROTATE_0;
g_display_rot_matrix.setIdentity(); g_display_rot_matrix.setIdentity();
bool swapChainExtentSwap = false;
if (surfCapabilities_.currentTransform & (VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR)) { if (surfCapabilities_.currentTransform & (VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR)) {
preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
} else if (surfCapabilities_.currentTransform & (VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR)) { } else if (surfCapabilities_.currentTransform & (VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR)) {
@ -1429,7 +1428,6 @@ bool IsHashMaliDriverVersion(const VkPhysicalDeviceProperties &props) {
// ARM used to put a hash in place of the driver version. // ARM used to put a hash in place of the driver version.
// Now they only use major versions. We'll just make a bad heuristic. // Now they only use major versions. We'll just make a bad heuristic.
uint32_t major = VK_VERSION_MAJOR(props.driverVersion); uint32_t major = VK_VERSION_MAJOR(props.driverVersion);
uint32_t minor = VK_VERSION_MINOR(props.driverVersion);
uint32_t branch = VK_VERSION_PATCH(props.driverVersion); uint32_t branch = VK_VERSION_PATCH(props.driverVersion);
if (branch > 0) if (branch > 0)
return true; return true;

View File

@ -43,7 +43,6 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback(
return false; return false;
} }
const char *pLayerPrefix = "";
if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) { if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
message << "ERROR("; message << "ERROR(";
} else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) { } else if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) {

View File

@ -235,6 +235,7 @@ static const char *device_name_blacklist[] = {
"SDL:Horizon", "SDL:Horizon",
}; };
#ifndef _WIN32
static const char *so_names[] = { static const char *so_names[] = {
#ifdef IOS #ifdef IOS
"@executable_path/Frameworks/libMoltenVK.dylib", "@executable_path/Frameworks/libMoltenVK.dylib",
@ -247,6 +248,7 @@ static const char *so_names[] = {
#endif #endif
#endif #endif
}; };
#endif
void VulkanSetAvailable(bool available) { void VulkanSetAvailable(bool available) {
g_vulkanAvailabilityChecked = true; g_vulkanAvailabilityChecked = true;

View File

@ -246,7 +246,6 @@ size_t VulkanDeviceAllocator::Allocate(const VkMemoryRequirements &reqs, VkDevic
bool VulkanDeviceAllocator::AllocateFromSlab(Slab &slab, size_t &start, size_t blocks, const char *tag) { bool VulkanDeviceAllocator::AllocateFromSlab(Slab &slab, size_t &start, size_t blocks, const char *tag) {
_assert_(!destroyed_); _assert_(!destroyed_);
bool matched = true;
if (start + blocks > slab.usage.size()) { if (start + blocks > slab.usage.size()) {
start = slab.usage.size(); start = slab.usage.size();

View File

@ -302,7 +302,6 @@ u32 DisassemblyManager::getNthPreviousAddress(u32 address, int n)
{ {
DisassemblyEntry* entry = it->second; DisassemblyEntry* entry = it->second;
int oldLineNum = entry->getLineNum(address,true); int oldLineNum = entry->getLineNum(address,true);
int oldNumLines = entry->getNumLines();
if (n <= oldLineNum) if (n <= oldLineNum)
{ {
return entry->getLineAddress(oldLineNum-n); return entry->getLineAddress(oldLineNum-n);
@ -420,7 +419,6 @@ int DisassemblyFunction::getLineNum(u32 address, bool findStart)
int last = (int)lineAddresses.size() - 1; int last = (int)lineAddresses.size() - 1;
for (int i = 0; i < last; i++) for (int i = 0; i < last; i++)
{ {
u32 next = lineAddresses[i + 1];
if (lineAddresses[i] == address) if (lineAddresses[i] == address)
return i; return i;
} }

View File

@ -1045,7 +1045,6 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) {
SendMessage(listbox, LB_INITSTORAGE, (WPARAM)activeFunctions.size(), (LPARAM)activeFunctions.size() * 30); SendMessage(listbox, LB_INITSTORAGE, (WPARAM)activeFunctions.size(), (LPARAM)activeFunctions.size() * 30);
for (auto it = activeFunctions.begin(), end = activeFunctions.end(); it != end; ++it) { for (auto it = activeFunctions.begin(), end = activeFunctions.end(); it != end; ++it) {
const FunctionEntry& entry = it->second;
const char* name = GetLabelName(it->first); const char* name = GetLabelName(it->first);
if (name != NULL) if (name != NULL)
wsprintf(temp, L"%S", name); wsprintf(temp, L"%S", name);
@ -1069,7 +1068,6 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) {
} }
for (auto it = activeData.begin(), end = activeData.end(); it != end; ++it) { for (auto it = activeData.begin(), end = activeData.end(); it != end; ++it) {
const DataEntry& entry = it->second;
const char* name = GetLabelName(it->first); const char* name = GetLabelName(it->first);
if (name != NULL) if (name != NULL)

View File

@ -431,7 +431,7 @@ size_t DirectoryFileHandle::Seek(s32 position, FileMove type)
LARGE_INTEGER distance; LARGE_INTEGER distance;
distance.QuadPart = position; distance.QuadPart = position;
LARGE_INTEGER cursor; LARGE_INTEGER cursor;
DWORD newPos = SetFilePointerEx(hFile, distance, &cursor, moveMethod); SetFilePointerEx(hFile, distance, &cursor, moveMethod);
result = (size_t)cursor.QuadPart; result = (size_t)cursor.QuadPart;
#else #else
int moveMethod = 0; int moveMethod = 0;

View File

@ -157,7 +157,6 @@ static const int frameTimeHistorySize = (int)ARRAY_SIZE(frameTimeHistory);
static int frameTimeHistoryPos = 0; static int frameTimeHistoryPos = 0;
static int frameTimeHistoryValid = 0; static int frameTimeHistoryValid = 0;
static double lastFrameTimeHistory = 0.0; static double lastFrameTimeHistory = 0.0;
static double monitorFpsUntil = 0.0;
static int lastNumFlips = 0; static int lastNumFlips = 0;
static float flips = 0.0f; static float flips = 0.0f;
static int actualFlips = 0; // taking frameskip into account static int actualFlips = 0; // taking frameskip into account
@ -599,7 +598,6 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
} }
// Auto-frameskip automatically if speed limit is set differently than the default. // Auto-frameskip automatically if speed limit is set differently than the default.
bool useAutoFrameskip = g_Config.bAutoFrameSkip && g_Config.iRenderingMode != FB_NON_BUFFERED_MODE;
bool forceFrameskip = fpsLimit > 60 && unthrottleNeedsSkip; bool forceFrameskip = fpsLimit > 60 && unthrottleNeedsSkip;
int frameSkipNum = CalculateFrameSkip(); int frameSkipNum = CalculateFrameSkip();
if (g_Config.bAutoFrameSkip || forceFrameskip) { if (g_Config.bAutoFrameSkip || forceFrameskip) {

View File

@ -1207,7 +1207,6 @@ static int sceFontFindFont(u32 libHandle, u32 fontStylePtr, u32 errorCodePtr) {
// Find the closest exact match for the fields specified. // Find the closest exact match for the fields specified.
float hRes = requestedStyle->fontHRes > 0.0f ? requestedStyle->fontHRes : fontLib->FontHRes(); float hRes = requestedStyle->fontHRes > 0.0f ? requestedStyle->fontHRes : fontLib->FontHRes();
float vRes = requestedStyle->fontVRes > 0.0f ? requestedStyle->fontVRes : fontLib->FontVRes();
for (size_t i = 0; i < internalFonts.size(); i++) { for (size_t i = 0; i < internalFonts.size(); i++) {
if (internalFonts[i]->MatchesStyle(*requestedStyle) != MATCH_NONE) { if (internalFonts[i]->MatchesStyle(*requestedStyle) != MATCH_NONE) {
auto matchStyle = internalFonts[i]->GetFontStyle(); auto matchStyle = internalFonts[i]->GetFontStyle();

View File

@ -610,7 +610,6 @@ static bool __KernelCheckResumeMsgPipeReceive(MsgPipe *m, MsgPipeWaitingThread &
static void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) { static void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) {
u32 error; u32 error;
u32 waitValue = __KernelGetWaitValue(threadID, error); u32 waitValue = __KernelGetWaitValue(threadID, error);
u32 timeoutPtr = __KernelGetWaitTimeoutPtr(threadID, error);
SceUID uid = __KernelGetWaitID(threadID, WAITTYPE_MSGPIPE, error); SceUID uid = __KernelGetWaitID(threadID, WAITTYPE_MSGPIPE, error);
MsgPipe *ko = uid == 0 ? NULL : kernelObjects.Get<MsgPipe>(uid, error); MsgPipe *ko = uid == 0 ? NULL : kernelObjects.Get<MsgPipe>(uid, error);

View File

@ -757,8 +757,6 @@ u32 __KernelInterruptReturnAddress() {
} }
static void __KernelDelayBeginCallback(SceUID threadID, SceUID prevCallbackId) { static void __KernelDelayBeginCallback(SceUID threadID, SceUID prevCallbackId) {
SceUID pauseKey = prevCallbackId == 0 ? threadID : prevCallbackId;
u32 error; u32 error;
SceUID waitID = __KernelGetWaitID(threadID, WAITTYPE_DELAY, error); SceUID waitID = __KernelGetWaitID(threadID, WAITTYPE_DELAY, error);
if (waitID == threadID) { if (waitID == threadID) {

View File

@ -795,7 +795,6 @@ static u32 scePsmfGetNumberOfSpecificStreams(u32 psmfStruct, int streamType) {
int streamNum = 0; int streamNum = 0;
for (auto it : psmf->streamMap) { for (auto it : psmf->streamMap) {
bool match = false;
if (it.second->matchesType(streamType)) { if (it.second->matchesType(streamType)) {
streamNum++; streamNum++;
} }

View File

@ -324,7 +324,6 @@ void ArmRegCacheFPU::FlushArmReg(ARMReg r) {
} else if (r >= D0 && r <= D31) { } else if (r >= D0 && r <= D31) {
// TODO: Convert to S regs and flush them individually. // TODO: Convert to S regs and flush them individually.
} else if (r >= Q0 && r <= Q15) { } else if (r >= Q0 && r <= Q15) {
int quad = r - Q0;
QFlush(r); QFlush(r);
} }
} }
@ -732,8 +731,6 @@ void ArmRegCacheFPU::QFlush(int quad) {
int ArmRegCacheFPU::QGetFreeQuad(int start, int count, const char *reason) { int ArmRegCacheFPU::QGetFreeQuad(int start, int count, const char *reason) {
// Search for a free quad. A quad is free if the first register in it is free. // Search for a free quad. A quad is free if the first register in it is free.
int quad = -1;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
int q = (i + start) & 15; int q = (i + start) & 15;

View File

@ -1502,7 +1502,6 @@ namespace MIPSComp {
memcpy(srcregs, sregs, sizeof(sregs)); memcpy(srcregs, sregs, sizeof(sregs));
memcpy(tempregs, dregs, sizeof(dregs)); memcpy(tempregs, dregs, sizeof(dregs));
int n = GetNumVectorElements(sz);
int nOut = GetNumVectorElements(outsize); int nOut = GetNumVectorElements(outsize);
// If src registers aren't contiguous, make them. // If src registers aren't contiguous, make them.
@ -1818,7 +1817,7 @@ namespace MIPSComp {
int n = GetNumVectorElements(sz); int n = GetNumVectorElements(sz);
u8 dregs[4]; u8 dregs[4];
GetVectorRegsPrefixD(dregs, sz, _VD); GetVectorRegsPrefixD(dregs, sz, vd);
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
ir.Write(IROp::SetConstF, dregs[i], ir.AddConstantFloat(cst_constants[conNum])); ir.Write(IROp::SetConstF, dregs[i], ir.AddConstantFloat(cst_constants[conNum]));
} }

View File

@ -42,7 +42,7 @@
namespace MIPSComp { namespace MIPSComp {
IRJit::IRJit(MIPSState *mips) : frontend_(mips->HasDefaultPrefix()), mips_(mips) { IRJit::IRJit(MIPSState *mips) : frontend_(mips->HasDefaultPrefix()), mips_(mips) {
u32 size = 128 * 1024; // u32 size = 128 * 1024;
// blTrampolines_ = kernelMemory.Alloc(size, true, "trampoline"); // blTrampolines_ = kernelMemory.Alloc(size, true, "trampoline");
InitIR(); InitIR();

View File

@ -164,7 +164,6 @@ bool ThreeOpToTwoOp(const IRWriter &in, IRWriter &out, const IROptions &opts) {
bool logBlocks = false; bool logBlocks = false;
for (int i = 0; i < (int)in.GetInstructions().size(); i++) { for (int i = 0; i < (int)in.GetInstructions().size(); i++) {
IRInst inst = in.GetInstructions()[i]; IRInst inst = in.GetInstructions()[i];
const IRMeta *meta = GetIRMeta(inst.op);
switch (inst.op) { switch (inst.op) {
case IROp::Sub: case IROp::Sub:
case IROp::Slt: case IROp::Slt:

View File

@ -364,7 +364,6 @@ namespace MIPSInt
int rt = _RT; int rt = _RT;
int rs = _RS; int rs = _RS;
int rd = _RD; int rd = _RD;
static bool has_warned = false;
// Don't change $zr. // Don't change $zr.
if (rd == 0) if (rd == 0)

View File

@ -720,7 +720,6 @@ namespace MIPSInt
u32 tprefixAdd = VFPU_MAKE_CONSTANTS(VFPUConst::ONE, VFPUConst::ZERO, VFPUConst::ONE, VFPUConst::ZERO); u32 tprefixAdd = VFPU_MAKE_CONSTANTS(VFPUConst::ONE, VFPUConst::ZERO, VFPUConst::ONE, VFPUConst::ZERO);
ApplyPrefixST(t, VFPURewritePrefix(VFPU_CTRL_TPREFIX, tprefixRemove, tprefixAdd), outSize); ApplyPrefixST(t, VFPURewritePrefix(VFPU_CTRL_TPREFIX, tprefixRemove, tprefixAdd), outSize);
int n = GetNumVectorElements(sz);
// Essentially D prefix saturation is forced. // Essentially D prefix saturation is forced.
d[0] = nanclamp(t[0] + s[0], 0.0f, 1.0f); d[0] = nanclamp(t[0] + s[0], 0.0f, 1.0f);
d[1] = nanclamp(t[1] + s[1], 0.0f, 1.0f); d[1] = nanclamp(t[1] + s[1], 0.0f, 1.0f);
@ -1226,7 +1225,6 @@ namespace MIPSInt
ReadVector(s, sz, vs); ReadVector(s, sz, vs);
ReadVector(t, sz, vs); ReadVector(t, sz, vs);
int n = GetNumVectorElements(sz);
if (op & 0x10000) { if (op & 0x10000) {
// vbfy2 // vbfy2
// S prefix forces the negate flags (so z and w are negative.) // S prefix forces the negate flags (so z and w are negative.)
@ -1973,7 +1971,7 @@ namespace MIPSInt
ApplySwizzleS(s, sz); ApplySwizzleS(s, sz);
ReadVector(t, sz, vt); ReadVector(t, sz, vt);
ApplySwizzleT(t, sz); ApplySwizzleT(t, sz);
for (int i = 0; i < GetNumVectorElements(sz); i++) { for (int i = 0; i < numElements; i++) {
if ( my_isnan(s[i]) || my_isnan(t[i]) ) if ( my_isnan(s[i]) || my_isnan(t[i]) )
d[i] = 0.0f; d[i] = 0.0f;
else else
@ -1998,7 +1996,7 @@ namespace MIPSInt
ApplySwizzleS(s, sz); ApplySwizzleS(s, sz);
ReadVector(t, sz, vt); ReadVector(t, sz, vt);
ApplySwizzleT(t, sz); ApplySwizzleT(t, sz);
for (int i = 0; i < GetNumVectorElements(sz); i++) { for (int i = 0; i < numElements; i++) {
if ( my_isnan(s[i]) || my_isnan(t[i]) ) if ( my_isnan(s[i]) || my_isnan(t[i]) )
d[i] = 0.0f; d[i] = 0.0f;
else else

View File

@ -964,7 +964,6 @@ int MIPSInterpret_RunUntil(u64 globalTicks)
while (coreState == CORE_RUNNING) while (coreState == CORE_RUNNING)
{ {
CoreTiming::Advance(); CoreTiming::Advance();
u32 lastPC = 0;
// NEVER stop in a delay slot! // NEVER stop in a delay slot!
while (curMips->downcount >= 0 && coreState == CORE_RUNNING) while (curMips->downcount >= 0 && coreState == CORE_RUNNING)
@ -974,17 +973,6 @@ int MIPSInterpret_RunUntil(u64 globalTicks)
again: again:
MIPSOpcode op = MIPSOpcode(Memory::Read_U32(curMips->pc)); MIPSOpcode op = MIPSOpcode(Memory::Read_U32(curMips->pc));
//MIPSOpcode op = Memory::Read_Opcode_JIT(mipsr4k.pc); //MIPSOpcode op = Memory::Read_Opcode_JIT(mipsr4k.pc);
/*
// Choke on VFPU
MIPSInfo info = MIPSGetInfo(op);
if (info & IS_VFPU)
{
if (!Core_IsStepping() && !GetAsyncKeyState(VK_LSHIFT))
{
Core_EnableStepping(true);
return;
}
}*/
//2: check for breakpoint (VERY SLOW) //2: check for breakpoint (VERY SLOW)
#if defined(_DEBUG) #if defined(_DEBUG)
@ -1002,18 +990,6 @@ int MIPSInterpret_RunUntil(u64 globalTicks)
#endif #endif
bool wasInDelaySlot = curMips->inDelaySlot; bool wasInDelaySlot = curMips->inDelaySlot;
/*
if (curMips->pc != lastPC + 4) {
if (blockCount > 0) {
MIPSState *mips_ = curMips;
fprintf(f, "BLOCK : %08x v0: %08x v1: %08x a0: %08x s0: %08x s4: %08x\n", mips_->pc, mips_->r[MIPS_REG_V0], mips_->r[MIPS_REG_V1], mips_->r[MIPS_REG_A0], mips_->r[MIPS_REG_S0], mips_->r[MIPS_REG_S4]);
fflush(f);
blockCount--;
}
}
lastPC = curMips->pc;
*/
MIPSInterpret(op); MIPSInterpret(op);
if (curMips->inDelaySlot) if (curMips->inDelaySlot)

View File

@ -873,7 +873,6 @@ float vfpu_rsqrt(float a) {
uint32_t z = 0x00800000 >> less_bits; uint32_t z = 0x00800000 >> less_bits;
uint32_t halfsp = sp >> (1 + less_bits); uint32_t halfsp = sp >> (1 + less_bits);
for (int i = 0; i < 6; ++i) { for (int i = 0; i < 6; ++i) {
uint32_t oldz = z;
uint32_t zsq = mant_mul(z, z); uint32_t zsq = mant_mul(z, z);
uint32_t correction = 0x00C00000 - mant_mul(halfsp, zsq); uint32_t correction = 0x00C00000 - mant_mul(halfsp, zsq);
z = mant_mul(z, correction); z = mant_mul(z, correction);

View File

@ -66,7 +66,7 @@ void ImHere() {
} }
void Jit::GenerateFixedCode(JitOptions &jo) { void Jit::GenerateFixedCode(JitOptions &jo) {
const u8 *start = AlignCodePage(); AlignCodePage();
BeginWrite(); BeginWrite();
restoreRoundingMode = AlignCode16(); { restoreRoundingMode = AlignCode16(); {

View File

@ -138,7 +138,6 @@ namespace MIPSComp {
void Jit::CompITypeMemUnpairedLR(MIPSOpcode op, bool isStore) void Jit::CompITypeMemUnpairedLR(MIPSOpcode op, bool isStore)
{ {
CONDITIONAL_DISABLE(LSU); CONDITIONAL_DISABLE(LSU);
int o = op>>26;
int offset = _IMM16; int offset = _IMM16;
MIPSGPReg rt = _RT; MIPSGPReg rt = _RT;
MIPSGPReg rs = _RS; MIPSGPReg rs = _RS;
@ -288,7 +287,6 @@ namespace MIPSComp {
CONDITIONAL_DISABLE(LSU); CONDITIONAL_DISABLE(LSU);
int offset = _IMM16; int offset = _IMM16;
MIPSGPReg rt = _RT; MIPSGPReg rt = _RT;
MIPSGPReg rs = _RS;
int o = op>>26; int o = op>>26;
if (((op >> 29) & 1) == 0 && rt == MIPS_REG_ZERO) { if (((op >> 29) & 1) == 0 && rt == MIPS_REG_ZERO) {
// Don't load anything into $zr // Don't load anything into $zr
@ -395,7 +393,7 @@ namespace MIPSComp {
default: default:
Comp_Generic(op); Comp_Generic(op);
return ; return;
} }
} }

View File

@ -238,8 +238,6 @@ bool IsOverlapSafe(int dreg, int di, int sn, u8 sregs[], int tn = 0, u8 tregs[]
return IsOverlapSafeAllowS(dreg, di, sn, sregs, tn, tregs) && sregs[di] != dreg; return IsOverlapSafeAllowS(dreg, di, sn, sregs, tn, tregs) && sregs[di] != dreg;
} }
alignas(16) static u32 ssLoadStoreTemp;
void Jit::Comp_SV(MIPSOpcode op) { void Jit::Comp_SV(MIPSOpcode op) {
CONDITIONAL_DISABLE(LSU_VFPU); CONDITIONAL_DISABLE(LSU_VFPU);
@ -796,7 +794,6 @@ void Jit::Comp_VCrossQuat(MIPSOpcode op) {
DISABLE; DISABLE;
VectorSize sz = GetVecSize(op); VectorSize sz = GetVecSize(op);
int n = GetNumVectorElements(sz);
u8 sregs[4], tregs[4], dregs[4]; u8 sregs[4], tregs[4], dregs[4];
GetVectorRegs(sregs, sz, _VS); GetVectorRegs(sregs, sz, _VS);
@ -1808,8 +1805,6 @@ extern const double mulTableVf2i[32] = {
(1ULL<<28),(1ULL<<29),(1ULL<<30),(1ULL<<31), (1ULL<<28),(1ULL<<29),(1ULL<<30),(1ULL<<31),
}; };
static const float half = 0.5f;
static const double maxMinIntAsDouble[2] = { (double)0x7fffffff, (double)(int)0x80000000 }; // that's not equal to 0x80000000 static const double maxMinIntAsDouble[2] = { (double)0x7fffffff, (double)(int)0x80000000 }; // that's not equal to 0x80000000
void Jit::Comp_Vf2i(MIPSOpcode op) { void Jit::Comp_Vf2i(MIPSOpcode op) {
@ -1934,7 +1929,7 @@ void Jit::Comp_Vcst(MIPSOpcode op) {
int n = GetNumVectorElements(sz); int n = GetNumVectorElements(sz);
u8 dregs[4]; u8 dregs[4];
GetVectorRegsPrefixD(dregs, sz, _VD); GetVectorRegsPrefixD(dregs, sz, vd);
if (RipAccessible(cst_constants)) { if (RipAccessible(cst_constants)) {
MOVSS(XMM0, M(&cst_constants[conNum])); // rip accessible MOVSS(XMM0, M(&cst_constants[conNum])); // rip accessible

View File

@ -236,7 +236,6 @@ namespace Reporting
bool SendReportRequest(const char *uri, const std::string &data, const std::string &mimeType, Buffer *output = NULL) bool SendReportRequest(const char *uri, const std::string &data, const std::string &mimeType, Buffer *output = NULL)
{ {
bool result = false;
http::Client http; http::Client http;
Buffer theVoid; Buffer theVoid;

View File

@ -85,7 +85,6 @@ int HighestSetBit(int value) {
} }
int LowestSetBit(int value, int maximum = 32) { int LowestSetBit(int value, int maximum = 32) {
int lowest = 0;
for (int i = 0; i < maximum; i++) { for (int i = 0; i < maximum; i++) {
if (value & (1 << i)) if (value & (1 << i))
return i; return i;

View File

@ -36,7 +36,6 @@ private:
File::IOFile file; File::IOFile file;
bool skip_silence = false; bool skip_silence = false;
uint32_t audio_size = 0; uint32_t audio_size = 0;
std::array<short, BUFFER_SIZE> conv_buffer{};
void Write(uint32_t value); void Write(uint32_t value);
void Write4(const char* ptr); void Write4(const char* ptr);
}; };

View File

@ -518,7 +518,6 @@ void DrawEngineCommon::DecodeVertsStep(u8 *dest, int &i, int &decodedVerts) {
int indexLowerBound = dc.indexLowerBound; int indexLowerBound = dc.indexLowerBound;
int indexUpperBound = dc.indexUpperBound; int indexUpperBound = dc.indexUpperBound;
void *inds = dc.inds;
if (dc.indexType == GE_VTYPE_IDX_NONE >> GE_VTYPE_IDX_SHIFT) { if (dc.indexType == GE_VTYPE_IDX_NONE >> GE_VTYPE_IDX_SHIFT) {
// Decode the verts and apply morphing. Simple. // Decode the verts and apply morphing. Simple.
dec_->DecodeVerts(dest + decodedVerts * (int)dec_->GetDecVtxFmt().stride, dec_->DecodeVerts(dest + decodedVerts * (int)dec_->GetDecVtxFmt().stride,

View File

@ -471,7 +471,6 @@ void PresentationCommon::DestroyPostShader() {
Draw::ShaderModule *PresentationCommon::CompileShaderModule(ShaderStage stage, ShaderLanguage lang, const std::string &src, std::string *errorString) { Draw::ShaderModule *PresentationCommon::CompileShaderModule(ShaderStage stage, ShaderLanguage lang, const std::string &src, std::string *errorString) {
std::string translated = src; std::string translated = src;
bool translationFailed = false;
if (lang != lang_) { if (lang != lang_) {
// Gonna have to upconvert the shader. // Gonna have to upconvert the shader.
if (!TranslateShader(&translated, lang_, draw_->GetShaderLanguageDesc(), nullptr, src, lang, stage, errorString)) { if (!TranslateShader(&translated, lang_, draw_->GetShaderLanguageDesc(), nullptr, src, lang, stage, errorString)) {

View File

@ -251,7 +251,6 @@ void BaseUpdateUniforms(UB_VS_FS_Base *ub, uint64_t dirtyUniforms, bool flipView
viewZInvScale = 0.0; viewZInvScale = 0.0;
} }
float data[4] = { viewZScale, viewZCenter, viewZCenter, viewZInvScale };
ub->depthRange[0] = viewZScale; ub->depthRange[0] = viewZScale;
ub->depthRange[1] = viewZCenter; ub->depthRange[1] = viewZCenter;
ub->depthRange[2] = viewZCenter; ub->depthRange[2] = viewZCenter;

View File

@ -564,7 +564,6 @@ TexCacheEntry *TextureCacheCommon::SetTexture() {
std::vector<AttachCandidate> TextureCacheCommon::GetFramebufferCandidates(const TextureDefinition &entry, u32 texAddrOffset) { std::vector<AttachCandidate> TextureCacheCommon::GetFramebufferCandidates(const TextureDefinition &entry, u32 texAddrOffset) {
gpuStats.numFramebufferEvaluations++; gpuStats.numFramebufferEvaluations++;
bool success = false;
std::vector<AttachCandidate> candidates; std::vector<AttachCandidate> candidates;
@ -884,8 +883,6 @@ FramebufferMatchInfo TextureCacheCommon::MatchFramebuffer(
(channel == NOTIFY_FB_COLOR && framebuffer->format == GE_FORMAT_8888 && entry.format == GE_TFMT_CLUT32) || (channel == NOTIFY_FB_COLOR && framebuffer->format == GE_FORMAT_8888 && entry.format == GE_TFMT_CLUT32) ||
(channel == NOTIFY_FB_COLOR && framebuffer->format != GE_FORMAT_8888 && entry.format == GE_TFMT_CLUT16); (channel == NOTIFY_FB_COLOR && framebuffer->format != GE_FORMAT_8888 && entry.format == GE_TFMT_CLUT16);
const bool clutFormat = IsClutFormat((GETextureFormat)(entry.format));
// To avoid ruining git blame, kept the same name as the old struct. // To avoid ruining git blame, kept the same name as the old struct.
FramebufferMatchInfo fbInfo{ FramebufferMatch::VALID }; FramebufferMatchInfo fbInfo{ FramebufferMatch::VALID };

View File

@ -231,7 +231,6 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int
// Add code to convert matrices to 4x4. // Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead. // Later we might want to do this when the matrices are loaded instead.
int boneCount = 0;
if (NEONSkinning && dec.weighttype && g_Config.bSoftwareSkinning) { if (NEONSkinning && dec.weighttype && g_Config.bSoftwareSkinning) {
// Copying from R3 to R4 // Copying from R3 to R4
MOVP2R(R3, gstate.boneMatrix); MOVP2R(R3, gstate.boneMatrix);

View File

@ -190,7 +190,6 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int
// Add code to convert matrices to 4x4. // Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead. // Later we might want to do this when the matrices are loaded instead.
int boneCount = 0;
if (dec.weighttype && g_Config.bSoftwareSkinning) { if (dec.weighttype && g_Config.bSoftwareSkinning) {
// Copying from R3 to R4 // Copying from R3 to R4
MOVP2R(X3, gstate.boneMatrix); MOVP2R(X3, gstate.boneMatrix);

View File

@ -219,7 +219,6 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int
// Add code to convert matrices to 4x4. // Add code to convert matrices to 4x4.
// Later we might want to do this when the matrices are loaded instead. // Later we might want to do this when the matrices are loaded instead.
int boneCount = 0;
if (dec.weighttype && g_Config.bSoftwareSkinning) { if (dec.weighttype && g_Config.bSoftwareSkinning) {
MOV(PTRBITS, R(tempReg1), ImmPtr(&threeMasks)); MOV(PTRBITS, R(tempReg1), ImmPtr(&threeMasks));
MOVAPS(XMM4, MatR(tempReg1)); MOVAPS(XMM4, MatR(tempReg1));

View File

@ -317,10 +317,6 @@ VertexArrayInfoD3D11::~VertexArrayInfoD3D11() {
ebo->Release(); ebo->Release();
} }
static uint32_t SwapRB(uint32_t c) {
return (c & 0xFF00FF00) | ((c >> 16) & 0xFF) | ((c << 16) & 0xFF0000);
}
// The inline wrapper in the header checks for numDrawCalls == 0 // The inline wrapper in the header checks for numDrawCalls == 0
void DrawEngineD3D11::DoFlush() { void DrawEngineD3D11::DoFlush() {
gpuStats.numFlushes++; gpuStats.numFlushes++;
@ -603,8 +599,6 @@ rotateVBO:
framebufferManager_->SetSafeSize(result.safeWidth, result.safeHeight); framebufferManager_->SetSafeSize(result.safeWidth, result.safeHeight);
if (result.action == SW_DRAW_PRIMITIVES) { if (result.action == SW_DRAW_PRIMITIVES) {
const int vertexSize = sizeof(transformed[0]);
ApplyDrawStateLate(result.setStencil, result.stencilValue); ApplyDrawStateLate(result.setStencil, result.stencilValue);
D3D11VertexShader *vshader; D3D11VertexShader *vshader;

View File

@ -184,8 +184,6 @@ void FramebufferManagerD3D11::DrawActiveTexture(float x, float y, float w, float
{{x, y + h, 0}, u0, v1}, {{x, y + h, 0}, u0, v1},
}; };
static const short indices[4] = { 0, 1, 3, 2 };
if (uvRotation != ROTATION_LOCKED_HORIZONTAL) { if (uvRotation != ROTATION_LOCKED_HORIZONTAL) {
float temp[8]; float temp[8];
int rotation = 0; int rotation = 0;

View File

@ -578,9 +578,6 @@ rotateVBO:
// TODO: Add a post-transform cache here for multi-RECTANGLES only. // TODO: Add a post-transform cache here for multi-RECTANGLES only.
// Might help for text drawing. // Might help for text drawing.
// these spam the gDebugger log.
const int vertexSize = sizeof(transformed[0]);
device_->SetVertexDeclaration(transformedVertexDecl_); device_->SetVertexDeclaration(transformedVertexDecl_);
if (result.drawIndexed) { if (result.drawIndexed) {
device_->DrawIndexedPrimitiveUP(d3d_prim[prim], 0, maxIndex, D3DPrimCount(d3d_prim[prim], result.drawNumTrans), inds, D3DFMT_INDEX16, result.drawBuffer, sizeof(TransformedVertex)); device_->DrawIndexedPrimitiveUP(d3d_prim[prim], 0, maxIndex, D3DPrimCount(d3d_prim[prim], result.drawNumTrans), inds, D3DFMT_INDEX16, result.drawBuffer, sizeof(TransformedVertex));

View File

@ -164,8 +164,6 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
x,y+h,0, u0,v1, x,y+h,0, u0,v1,
}; };
static const short indices[4] = { 0, 1, 3, 2 };
if (uvRotation != ROTATION_LOCKED_HORIZONTAL) { if (uvRotation != ROTATION_LOCKED_HORIZONTAL) {
float temp[8]; float temp[8];
int rotation = 0; int rotation = 0;
@ -405,7 +403,6 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
HRESULT hr = tex->LockRect(0, &locked, &rect, D3DLOCK_READONLY); HRESULT hr = tex->LockRect(0, &locked, &rect, D3DLOCK_READONLY);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
const int dstByteOffset = y * vfb->fb_stride * sizeof(s16);
const u32 *packed = (const u32 *)locked.pBits; const u32 *packed = (const u32 *)locked.pBits;
u16 *depth = (u16 *)Memory::GetPointer(z_address); u16 *depth = (u16 *)Memory::GetPointer(z_address);

View File

@ -685,8 +685,6 @@ void TextureCacheDX9::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &re
bool TextureCacheDX9::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int level) { bool TextureCacheDX9::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int level) {
SetTexture(); SetTexture();
ApplyTexture(); ApplyTexture();
int w = gstate.getTextureWidth(level);
int h = gstate.getTextureHeight(level);
LPDIRECT3DBASETEXTURE9 baseTex; LPDIRECT3DBASETEXTURE9 baseTex;
LPDIRECT3DTEXTURE9 tex; LPDIRECT3DTEXTURE9 tex;

View File

@ -86,7 +86,6 @@ private:
LPDIRECT3DTEXTURE9 lastBoundTexture; LPDIRECT3DTEXTURE9 lastBoundTexture;
float maxAnisotropyLevel; float maxAnisotropyLevel;
int decimationCounter_;
int texelsScaledThisFrame_; int texelsScaledThisFrame_;
int timesInvalidatedAllThisFrame_; int timesInvalidatedAllThisFrame_;

View File

@ -594,13 +594,9 @@ void DrawEngineGLES::DoFlush() {
ApplyDrawStateLate(result.setStencil, result.stencilValue); ApplyDrawStateLate(result.setStencil, result.stencilValue);
LinkedShader *program = shaderManager_->ApplyFragmentShader(vsid, vshader, lastVType_, framebufferManager_->UseBufferedRendering()); shaderManager_->ApplyFragmentShader(vsid, vshader, lastVType_, framebufferManager_->UseBufferedRendering());
if (result.action == SW_DRAW_PRIMITIVES) { if (result.action == SW_DRAW_PRIMITIVES) {
const int vertexSize = sizeof(transformed[0]);
bool doTextureProjection = gstate.getUVGenMode() == GE_TEXMAP_TEXTURE_MATRIX;
if (result.drawIndexed) { if (result.drawIndexed) {
vertexBufferOffset = (uint32_t)frameData.pushVertex->Push(result.drawBuffer, maxIndex * sizeof(TransformedVertex), &vertexBuffer); vertexBufferOffset = (uint32_t)frameData.pushVertex->Push(result.drawBuffer, maxIndex * sizeof(TransformedVertex), &vertexBuffer);
indexBufferOffset = (uint32_t)frameData.pushIndex->Push(inds, sizeof(uint16_t) * result.drawNumTrans, &indexBuffer); indexBufferOffset = (uint32_t)frameData.pushIndex->Push(inds, sizeof(uint16_t) * result.drawNumTrans, &indexBuffer);

View File

@ -172,8 +172,6 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
u0,v1, u0,v1,
}; };
static const GLushort indices[4] = { 0,1,3,2 };
if (uvRotation != ROTATION_LOCKED_HORIZONTAL) { if (uvRotation != ROTATION_LOCKED_HORIZONTAL) {
float temp[8]; float temp[8];
int rotation = 0; int rotation = 0;

View File

@ -327,7 +327,6 @@ public:
} }
void Shade(GLRenderManager *render) { void Shade(GLRenderManager *render) {
static const GLubyte indices[4] = { 0, 1, 3, 2 };
render->SetViewport(GLRViewport{ 0, 0, (float)renderW_, (float)renderH_, 0.0f, 1.0f }); render->SetViewport(GLRViewport{ 0, 0, (float)renderW_, (float)renderH_, 0.0f, 1.0f });
render->Draw(GL_TRIANGLE_STRIP, 0, 4); render->Draw(GL_TRIANGLE_STRIP, 0, 4);
} }

View File

@ -2248,7 +2248,6 @@ void GPUCommon::Execute_ImmVertexAlphaPrim(u32 op, u32 diff) {
return; return;
} }
uint32_t data = op & 0xFFFFFF;
TransformedVertex &v = immBuffer_[immCount_++]; TransformedVertex &v = immBuffer_[immCount_++];
// Formula deduced from ThrillVille's clear. // Formula deduced from ThrillVille's clear.

View File

@ -105,7 +105,6 @@ inline float clip_dotprod(const VertexData &vert, float A, float B, float C, flo
if (mask & PLANE_BIT) { \ if (mask & PLANE_BIT) { \
float dp0 = clip_dotprod(*Vertices[0], A, B, C, D ); \ float dp0 = clip_dotprod(*Vertices[0], A, B, C, D ); \
float dp1 = clip_dotprod(*Vertices[1], A, B, C, D ); \ float dp1 = clip_dotprod(*Vertices[1], A, B, C, D ); \
int numVertices = 0; \
\ \
if (mask0 & PLANE_BIT) { \ if (mask0 & PLANE_BIT) { \
if (dp0 < 0) { \ if (dp0 < 0) { \

View File

@ -1661,7 +1661,6 @@ void DrawLine(const VertexData &v0, const VertexData &v1)
if (gstate.isAntiAliasEnabled()) { if (gstate.isAntiAliasEnabled()) {
// TODO: This is a niave and wrong implementation. // TODO: This is a niave and wrong implementation.
DrawingCoords p0 = TransformUnit::ScreenToDrawing(ScreenCoords((int)x, (int)y, (int)z)); DrawingCoords p0 = TransformUnit::ScreenToDrawing(ScreenCoords((int)x, (int)y, (int)z));
DrawingCoords p1 = TransformUnit::ScreenToDrawing(ScreenCoords((int)(x + xinc), (int)(y + yinc), (int)(z + zinc)));
s = ((float)p0.x + xinc / 32.0f) / 512.0f; s = ((float)p0.x + xinc / 32.0f) / 512.0f;
t = ((float)p0.y + yinc / 32.0f) / 512.0f; t = ((float)p0.y + yinc / 32.0f) / 512.0f;

View File

@ -116,7 +116,6 @@ void DrawGPUProfilerVis(UIContext *ui, GPUInterface *gpu) {
std::string text = gpuVulkan->GetGpuProfileString(); std::string text = gpuVulkan->GetGpuProfileString();
Draw::DrawContext *draw = ui->GetDrawContext();
ui->SetFontScale(0.4f, 0.4f); ui->SetFontScale(0.4f, 0.4f);
ui->DrawTextShadow(text.c_str(), x, y, 0xFFFFFFFF, FLAG_DYNAMIC_ASCII); ui->DrawTextShadow(text.c_str(), x, y, 0xFFFFFFFF, FLAG_DYNAMIC_ASCII);
ui->SetFontScale(1.0f, 1.0f); ui->SetFontScale(1.0f, 1.0f);

View File

@ -866,8 +866,6 @@ void DrawEngineVulkan::DoFlush() {
baseUBOOffset, lightUBOOffset, boneUBOOffset, baseUBOOffset, lightUBOOffset, boneUBOOffset,
}; };
int stride = dec_->GetDecVtxFmt().stride;
if (useElements) { if (useElements) {
if (!ibuf) { if (!ibuf) {
ibOffset = (uint32_t)frame->pushIndex->Push(decIndex, sizeof(uint16_t) * indexGen.VertexCount(), &ibuf); ibOffset = (uint32_t)frame->pushIndex->Push(decIndex, sizeof(uint16_t) * indexGen.VertexCount(), &ibuf);
@ -996,12 +994,10 @@ void DrawEngineVulkan::DoFlush() {
VkBuffer vbuf, ibuf; VkBuffer vbuf, ibuf;
vbOffset = (uint32_t)frame->pushVertex->Push(result.drawBuffer, maxIndex * sizeof(TransformedVertex), &vbuf); vbOffset = (uint32_t)frame->pushVertex->Push(result.drawBuffer, maxIndex * sizeof(TransformedVertex), &vbuf);
ibOffset = (uint32_t)frame->pushIndex->Push(inds, sizeof(short) * result.drawNumTrans, &ibuf); ibOffset = (uint32_t)frame->pushIndex->Push(inds, sizeof(short) * result.drawNumTrans, &ibuf);
VkDeviceSize offsets[1] = { vbOffset };
renderManager->DrawIndexed(pipelineLayout_, ds, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, ibuf, ibOffset, result.drawNumTrans, 1, VK_INDEX_TYPE_UINT16); renderManager->DrawIndexed(pipelineLayout_, ds, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, ibuf, ibOffset, result.drawNumTrans, 1, VK_INDEX_TYPE_UINT16);
} else { } else {
VkBuffer vbuf; VkBuffer vbuf;
vbOffset = (uint32_t)frame->pushVertex->Push(result.drawBuffer, result.drawNumTrans * sizeof(TransformedVertex), &vbuf); vbOffset = (uint32_t)frame->pushVertex->Push(result.drawBuffer, result.drawNumTrans * sizeof(TransformedVertex), &vbuf);
VkDeviceSize offsets[1] = { vbOffset };
renderManager->Draw(pipelineLayout_, ds, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, result.drawNumTrans); renderManager->Draw(pipelineLayout_, ds, ARRAY_SIZE(dynamicUBOOffsets), dynamicUBOOffsets, vbuf, vbOffset, result.drawNumTrans);
} }
} else if (result.action == SW_CLEAR) { } else if (result.action == SW_CLEAR) {

View File

@ -246,7 +246,6 @@ static VulkanPipeline *CreateVulkanPipeline(VkDevice device, VkPipelineCache pip
inputAssembly.primitiveRestartEnable = false; inputAssembly.primitiveRestartEnable = false;
int vertexStride = 0; int vertexStride = 0;
int offset = 0;
VkVertexInputAttributeDescription attrs[8]; VkVertexInputAttributeDescription attrs[8];
int attributeCount; int attributeCount;
if (useHwTransform) { if (useHwTransform) {
@ -616,7 +615,6 @@ void PipelineManagerVulkan::SaveCache(FILE *file, bool saveRawPipelineCache, Sha
bool failed = false; bool failed = false;
bool writeFailed = false; bool writeFailed = false;
int count = 0;
// Since we don't include the full pipeline key, there can be duplicates, // Since we don't include the full pipeline key, there can be duplicates,
// caused by things like switching from buffered to non-buffered rendering. // caused by things like switching from buffered to non-buffered rendering.
// Make sure the set of pipelines we write is "unique". // Make sure the set of pipelines we write is "unique".
@ -724,6 +722,9 @@ bool PipelineManagerVulkan::LoadCache(FILE *file, bool loadRawPipelineCache, Sha
if (!pipelineCache_) { if (!pipelineCache_) {
VkPipelineCacheCreateInfo pc{ VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO }; VkPipelineCacheCreateInfo pc{ VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
VkResult res = vkCreatePipelineCache(vulkan_->GetDevice(), &pc, nullptr, &pipelineCache_); VkResult res = vkCreatePipelineCache(vulkan_->GetDevice(), &pc, nullptr, &pipelineCache_);
if (res != VK_SUCCESS) {
return false;
}
} }
} }

View File

@ -1073,7 +1073,6 @@ TexCacheEntry::TexStatus TextureCacheVulkan::CheckAlpha(const u32 *pixelData, Vk
} }
void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) { void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) {
VulkanTexture *tex = entry.vkTex;
int w = gstate.getTextureWidth(level); int w = gstate.getTextureWidth(level);
int h = gstate.getTextureHeight(level); int h = gstate.getTextureHeight(level);

View File

@ -47,7 +47,6 @@ void Vulkan2D::DestroyDeviceObjects() {
} }
keptPipelines_.clear(); keptPipelines_.clear();
VkDevice device = vulkan_->GetDevice();
if (descriptorSetLayout_ != VK_NULL_HANDLE) { if (descriptorSetLayout_ != VK_NULL_HANDLE) {
vulkan_->Delete().QueueDeleteDescriptorSetLayout(descriptorSetLayout_); vulkan_->Delete().QueueDeleteDescriptorSetLayout(descriptorSetLayout_);
} }

View File

@ -109,8 +109,6 @@ void ControlMapper::Refresh() {
LinearLayout *root = Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(550, WRAP_CONTENT))); LinearLayout *root = Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(550, WRAP_CONTENT)));
root->SetSpacing(3.0f); root->SetSpacing(3.0f);
const int padding = 4;
auto iter = keyImages.find(keyName_); auto iter = keyImages.find(keyName_);
// First, look among images. // First, look among images.
if (iter != keyImages.end()) { if (iter != keyImages.end()) {
@ -138,7 +136,6 @@ void ControlMapper::Refresh() {
for (size_t i = 0; i < mappings.size(); i++) { for (size_t i = 0; i < mappings.size(); i++) {
std::string deviceName = GetDeviceName(mappings[i].deviceId); std::string deviceName = GetDeviceName(mappings[i].deviceId);
std::string keyName = KeyMap::GetKeyOrAxisName(mappings[i].keyCode); std::string keyName = KeyMap::GetKeyOrAxisName(mappings[i].keyCode);
int image = -1;
LinearLayout *row = rightColumn->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); LinearLayout *row = rightColumn->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
row->SetSpacing(1.0f); row->SetSpacing(1.0f);

View File

@ -188,7 +188,7 @@ UI::EventReturn CwCheatScreen::OnImportCheat(UI::EventParams &params) {
} }
std::string line; std::string line;
std::vector<std::string> title; std::vector<std::string> title;
bool finished = false, skip = false; bool finished = false;
std::vector<std::string> newList; std::vector<std::string> newList;
std::string cheatFile = GetSysDirectory(DIRECTORY_CHEATS) + "cheat.db"; std::string cheatFile = GetSysDirectory(DIRECTORY_CHEATS) + "cheat.db";

View File

@ -252,8 +252,6 @@ void EmuScreen::bootGame(const std::string &filename) {
coreParam.printfEmuLog = false; coreParam.printfEmuLog = false;
coreParam.headLess = false; coreParam.headLess = false;
const Bounds &bounds = screenManager()->getUIContext()->GetBounds();
if (g_Config.iInternalResolution == 0) { if (g_Config.iInternalResolution == 0) {
coreParam.renderWidth = pixel_xres; coreParam.renderWidth = pixel_xres;
coreParam.renderHeight = pixel_yres; coreParam.renderHeight = pixel_yres;

View File

@ -233,7 +233,6 @@ bool GameInfo::DeleteAllSaveData() {
std::vector<FileInfo> fileInfo; std::vector<FileInfo> fileInfo;
getFilesInDir(saveDataDir[j].c_str(), &fileInfo); getFilesInDir(saveDataDir[j].c_str(), &fileInfo);
u64 totalSize = 0;
for (size_t i = 0; i < fileInfo.size(); i++) { for (size_t i = 0; i < fileInfo.size(); i++) {
File::Delete(fileInfo[i].fullName.c_str()); File::Delete(fileInfo[i].fullName.c_str());
} }

View File

@ -899,7 +899,7 @@ void GameSettingsScreen::CreateViews() {
rewindFreq->SetZeroLabel(sy->T("Off")); rewindFreq->SetZeroLabel(sy->T("Off"));
systemSettings->Add(new CheckBox(&g_Config.bMemStickInserted, sy->T("Memory Stick inserted"))); systemSettings->Add(new CheckBox(&g_Config.bMemStickInserted, sy->T("Memory Stick inserted")));
PopupSliderChoice *memStickSize = systemSettings->Add(new PopupSliderChoice(&g_Config.iMemStickSizeGB, 1, 32, sy->T("Change Memory Stick Size", "Change Memory Stick Size(GB)"), screenManager(), "GB")); systemSettings->Add(new PopupSliderChoice(&g_Config.iMemStickSizeGB, 1, 32, sy->T("Change Memory Stick Size", "Change Memory Stick Size(GB)"), screenManager(), "GB"));
systemSettings->Add(new ItemHeader(sy->T("General"))); systemSettings->Add(new ItemHeader(sy->T("General")));

View File

@ -273,7 +273,6 @@ void PSPDpad::GetContentDimensions(const UIContext &dc, float &w, float &h) cons
} }
void PSPDpad::Touch(const TouchInput &input) { void PSPDpad::Touch(const TouchInput &input) {
int lastDown = down_;
GamepadView::Touch(input); GamepadView::Touch(input);
if (input.flags & TOUCH_DOWN) { if (input.flags & TOUCH_DOWN) {
@ -412,7 +411,6 @@ void PSPStick::Draw(UIContext &dc) {
uint32_t colorBg = colorAlpha(GetButtonColor(), opacity); uint32_t colorBg = colorAlpha(GetButtonColor(), opacity);
uint32_t downBg = colorAlpha(0x00FFFFFF, opacity * 0.5f); uint32_t downBg = colorAlpha(0x00FFFFFF, opacity * 0.5f);
uint32_t color = colorAlpha(0x808080, opacity);
if (centerX_ < 0.0f) { if (centerX_ < 0.0f) {
centerX_ = bounds_.centerX(); centerX_ = bounds_.centerX();
@ -511,7 +509,6 @@ void PSPCustomStick::Draw(UIContext &dc) {
uint32_t colorBg = colorAlpha(GetButtonColor(), opacity); uint32_t colorBg = colorAlpha(GetButtonColor(), opacity);
uint32_t downBg = colorAlpha(0x00FFFFFF, opacity * 0.5f); uint32_t downBg = colorAlpha(0x00FFFFFF, opacity * 0.5f);
uint32_t color = colorAlpha(0x808080, opacity);
if (centerX_ < 0.0f) { if (centerX_ < 0.0f) {
centerX_ = bounds_.centerX(); centerX_ = bounds_.centerX();

View File

@ -517,9 +517,6 @@ void LogoScreen::render() {
const Bounds &bounds = dc.GetBounds(); const Bounds &bounds = dc.GetBounds();
float xres = bounds.w;
float yres = bounds.h;
dc.Begin(); dc.Begin();
float t = (float)sinceStart_ / (logoScreenSeconds / 3.0f); float t = (float)sinceStart_ / (logoScreenSeconds / 3.0f);
@ -545,13 +542,13 @@ void LogoScreen::render() {
dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER);
} }
dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, textColor, ALIGN_CENTER); dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, textColor, ALIGN_CENTER);
//dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", xres / 2, yres / 2 - 30, textColor, ALIGN_CENTER); //dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", bounds.w / 2, bounds.h / 2 - 30, textColor, ALIGN_CENTER);
dc.SetFontScale(1.0f, 1.0f); dc.SetFontScale(1.0f, 1.0f);
dc.SetFontStyle(dc.theme->uiFont); dc.SetFontStyle(dc.theme->uiFont);
dc.DrawText(temp, bounds.centerX(), bounds.centerY() + 40, textColor, ALIGN_CENTER); dc.DrawText(temp, bounds.centerX(), bounds.centerY() + 40, textColor, ALIGN_CENTER);
dc.DrawText(cr->T("license", "Free Software under GPL 2.0+"), bounds.centerX(), bounds.centerY() + 70, textColor, ALIGN_CENTER); dc.DrawText(cr->T("license", "Free Software under GPL 2.0+"), bounds.centerX(), bounds.centerY() + 70, textColor, ALIGN_CENTER);
int ppsspp_org_y = yres / 2 + 130; int ppsspp_org_y = bounds.h / 2 + 130;
dc.DrawText("www.ppsspp.org", bounds.centerX(), ppsspp_org_y, textColor, ALIGN_CENTER); dc.DrawText("www.ppsspp.org", bounds.centerX(), ppsspp_org_y, textColor, ALIGN_CENTER);
#if (defined(_WIN32) && !PPSSPP_PLATFORM(UWP)) || PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(LINUX) #if (defined(_WIN32) && !PPSSPP_PLATFORM(UWP)) || PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(LINUX)

View File

@ -149,7 +149,6 @@ static bool isOuya;
static bool resized = false; static bool resized = false;
static bool restarting = false; static bool restarting = false;
static bool askedForStoragePermission = false;
static int renderCounter = 0; static int renderCounter = 0;
struct PendingMessage { struct PendingMessage {

View File

@ -23,6 +23,7 @@
#include "Common/UI/View.h" #include "Common/UI/View.h"
#include "Common/Profiler/Profiler.h" #include "Common/Profiler/Profiler.h"
#ifdef USE_PROFILER
static const uint32_t nice_colors[] = { static const uint32_t nice_colors[] = {
0xFF8040, 0xFF8040,
0x80FF40, 0x80FF40,
@ -44,6 +45,7 @@ static const uint32_t nice_colors[] = {
0xF8F8F8, 0xF8F8F8,
0x33FFFF, 0x33FFFF,
}; };
#endif
enum ProfileCatStatus { enum ProfileCatStatus {
PROFILE_CAT_VISIBLE = 0, PROFILE_CAT_VISIBLE = 0,

View File

@ -348,7 +348,6 @@ void ControlLayoutView::CreateViews() {
ImageID rectImage = g_Config.iTouchButtonStyle ? ImageID("I_RECT_LINE") : ImageID("I_RECT"); ImageID rectImage = g_Config.iTouchButtonStyle ? ImageID("I_RECT_LINE") : ImageID("I_RECT");
ImageID shoulderImage = g_Config.iTouchButtonStyle ? ImageID("I_SHOULDER_LINE") : ImageID("I_SHOULDER"); ImageID shoulderImage = g_Config.iTouchButtonStyle ? ImageID("I_SHOULDER_LINE") : ImageID("I_SHOULDER");
ImageID dirImage = g_Config.iTouchButtonStyle ? ImageID("I_DIR_LINE") : ImageID("I_DIR");
ImageID stickImage = g_Config.iTouchButtonStyle ? ImageID("I_STICK_LINE") : ImageID("I_STICK"); ImageID stickImage = g_Config.iTouchButtonStyle ? ImageID("I_STICK_LINE") : ImageID("I_STICK");
ImageID stickBg = g_Config.iTouchButtonStyle ? ImageID("I_STICK_BG_LINE") : ImageID("I_STICK_BG"); ImageID stickBg = g_Config.iTouchButtonStyle ? ImageID("I_STICK_BG_LINE") : ImageID("I_STICK_BG");
ImageID roundImage = g_Config.iTouchButtonStyle ? ImageID("I_ROUND_LINE") : ImageID("I_ROUND"); ImageID roundImage = g_Config.iTouchButtonStyle ? ImageID("I_ROUND_LINE") : ImageID("I_ROUND");

View File

@ -20,9 +20,6 @@
#include "DSoundStream.h" #include "DSoundStream.h"
// TODO: Get rid of this
static DSoundAudioBackend *g_dsound;
inline int RoundDown128(int x) { inline int RoundDown128(int x) {
return x & (~127); return x & (~127);
} }

View File

@ -866,7 +866,6 @@ void CtrlDisAsmView::toggleBreakpoint(bool toggleEnabled)
void CtrlDisAsmView::onMouseDown(WPARAM wParam, LPARAM lParam, int button) void CtrlDisAsmView::onMouseDown(WPARAM wParam, LPARAM lParam, int button)
{ {
dontRedraw = false; dontRedraw = false;
int x = LOWORD(lParam);
int y = HIWORD(lParam); int y = HIWORD(lParam);
u32 newAddress = yToAddress(y); u32 newAddress = yToAddress(y);
@ -921,7 +920,6 @@ void CtrlDisAsmView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
{ {
if (button == 1) if (button == 1)
{ {
int x = LOWORD(lParam);
int y = HIWORD(lParam); int y = HIWORD(lParam);
setCurAddress(yToAddress(y), KeyDownAsync(VK_SHIFT)); setCurAddress(yToAddress(y), KeyDownAsync(VK_SHIFT));
redraw(); redraw();
@ -1076,7 +1074,6 @@ void CtrlDisAsmView::onMouseMove(WPARAM wParam, LPARAM lParam, int button)
{ {
if ((button & 1) != 0) if ((button & 1) != 0)
{ {
int x = LOWORD(lParam);
int y = HIWORD(lParam); int y = HIWORD(lParam);
setCurAddress(yToAddress(y), KeyDownAsync(VK_SHIFT)); setCurAddress(yToAddress(y), KeyDownAsync(VK_SHIFT));
// TODO: Perhaps don't do this every time, but on a timer? // TODO: Perhaps don't do this every time, but on a timer?

View File

@ -312,7 +312,6 @@ void CtrlRegisterList::onKeyDown(WPARAM wParam, LPARAM lParam)
{ {
RECT rect; RECT rect;
GetClientRect(this->wnd, &rect); GetClientRect(this->wnd, &rect);
int page=(rect.bottom/rowHeight)/2-1;
if (ctrlDown && tolower(wParam) == 'c') if (ctrlDown && tolower(wParam) == 'c')
{ {

View File

@ -28,15 +28,12 @@ class CtrlRegisterList
int rowHeight; int rowHeight;
int selection = 0; int selection = 0;
int marker = 0;
int category = 0; int category = 0;
int oldSelection = 0; int oldSelection = 0;
bool selectionChanged = false;
bool selecting = false; bool selecting = false;
bool hasFocus = false; bool hasFocus = false;
bool showHex = false;
DebugInterface *cpu = nullptr; DebugInterface *cpu = nullptr;
static TCHAR szClassName[]; static TCHAR szClassName[];

View File

@ -384,7 +384,6 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
case WM_COMMAND: case WM_COMMAND:
{ {
CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW));
CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST));
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case ID_TOGGLE_BREAK: case ID_TOGGLE_BREAK:
SendMessage(MainWindow::GetHWND(), WM_COMMAND, ID_TOGGLE_BREAK, 0); SendMessage(MainWindow::GetHWND(), WM_COMMAND, ID_TOGGLE_BREAK, 0);
@ -880,8 +879,8 @@ void CDisasm::Goto(u32 addr)
void CDisasm::UpdateDialog(bool _bComplete) void CDisasm::UpdateDialog(bool _bComplete)
{ {
HWND gotoInt = GetDlgItem(m_hDlg, IDC_GOTOINT);
/* /*
HWND gotoInt = GetDlgItem(m_hDlg, IDC_GOTOINT);
ComboBox_ResetContent(gotoInt); ComboBox_ResetContent(gotoInt);
for (int i=0; i<numRegions; i++) for (int i=0; i<numRegions; i++)
{ {

View File

@ -188,7 +188,6 @@ void CtrlDisplayListView::onPaint(WPARAM wParam, LPARAM lParam)
bool stall = address == list.stall; bool stall = address == list.stall;
int rowY1 = rowHeight*i; int rowY1 = rowHeight*i;
int rowY2 = rowHeight*(i+1);
// draw background // draw background
COLORREF backgroundColor = stall ? 0xCCCCFF : 0xFFFFFF; COLORREF backgroundColor = stall ? 0xCCCCFF : 0xFFFFFF;
@ -270,7 +269,6 @@ void CtrlDisplayListView::toggleBreakpoint()
void CtrlDisplayListView::onMouseDown(WPARAM wParam, LPARAM lParam, int button) void CtrlDisplayListView::onMouseDown(WPARAM wParam, LPARAM lParam, int button)
{ {
int x = LOWORD(lParam);
int y = HIWORD(lParam); int y = HIWORD(lParam);
int line = y/rowHeight; int line = y/rowHeight;

View File

@ -535,15 +535,6 @@ namespace MainWindow {
osm.Show(messageStream.str()); osm.Show(messageStream.str());
} }
static void enableCheats(bool cheats) {
g_Config.bEnableCheats = cheats;
}
static void setDisplayOptions(int options) {
g_Config.iSmallDisplayZoomType = options;
NativeMessageReceived("gpu_resized", "");
}
static void RestartApp() { static void RestartApp() {
if (IsDebuggerPresent()) { if (IsDebuggerPresent()) {
PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0); PostMessage(MainWindow::GetHWND(), WM_USER_RESTART_EMUTHREAD, 0, 0);
@ -559,7 +550,6 @@ namespace MainWindow {
auto gr = GetI18NCategory("Graphics"); auto gr = GetI18NCategory("Graphics");
int wmId = LOWORD(wParam); int wmId = LOWORD(wParam);
int wmEvent = HIWORD(wParam);
// Parse the menu selections: // Parse the menu selections:
switch (wmId) { switch (wmId) {
case ID_FILE_LOAD: case ID_FILE_LOAD:

View File

@ -104,7 +104,7 @@ int TabControl::AppendPageToControl(const wchar_t *title)
tcItem.iImage = 0; tcItem.iImage = 0;
int index = TabCtrl_GetItemCount(hwnd); int index = TabCtrl_GetItemCount(hwnd);
int result = TabCtrl_InsertItem(hwnd,index,&tcItem); TabCtrl_InsertItem(hwnd, index, &tcItem);
return index; return index;
} }

View File

@ -417,6 +417,7 @@ static std::string GetDefaultLangRegion() {
static const int EXIT_CODE_VULKAN_WORKS = 42; static const int EXIT_CODE_VULKAN_WORKS = 42;
#ifndef _DEBUG
static bool DetectVulkanInExternalProcess() { static bool DetectVulkanInExternalProcess() {
std::wstring workingDirectory; std::wstring workingDirectory;
std::wstring moduleFilename; std::wstring moduleFilename;
@ -447,6 +448,7 @@ static bool DetectVulkanInExternalProcess() {
return exitCode == EXIT_CODE_VULKAN_WORKS; return exitCode == EXIT_CODE_VULKAN_WORKS;
} }
#endif
std::vector<std::wstring> GetWideCmdLine() { std::vector<std::wstring> GetWideCmdLine() {
wchar_t **wargv; wchar_t **wargv;
@ -656,7 +658,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
MainWindow::Show(_hInstance); MainWindow::Show(_hInstance);
HWND hwndMain = MainWindow::GetHWND(); HWND hwndMain = MainWindow::GetHWND();
HWND hwndDisplay = MainWindow::GetDisplayHWND();
//initialize custom controls //initialize custom controls
CtrlDisAsmView::init(); CtrlDisAsmView::init();