Project64: Code clean up
This commit is contained in:
parent
a2981ff4d8
commit
a65086579f
|
@ -1,7 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include <io.h>
|
||||
|
||||
#include "PluginList.h"
|
||||
#include <Project64-core/Plugins/PluginBase.h>
|
||||
#include <io.h>
|
||||
|
||||
CPluginList::CPluginList(bool bAutoFill /* = true */) :
|
||||
m_PluginDir(g_Settings->LoadStringVal(Directory_Plugin), "")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "UISettings.h"
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-ApplicationIndex.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <Project64\UserInterface\About.h>
|
||||
|
||||
CAboutDlg::CAboutDlg(CProjectSupport & Support) :
|
||||
|
@ -66,7 +67,6 @@ void CAboutDlg::SetWindowDetais(int nIDDlgItem, int nAboveIDDlgItem, const wchar
|
|||
Wnd.SetWindowPos(nullptr, rcWin.left, Top, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOOWNERZORDER);
|
||||
}
|
||||
|
||||
|
||||
LRESULT CAboutDlg::OnColorStatic(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL & /*bHandled*/)
|
||||
{
|
||||
HDC hdcStatic = (HDC)wParam;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <Project64-core/N64System/Enhancement/Enhancements.h>
|
||||
|
||||
CCheatsUI::CCheatsUI(void) :
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Assembler.h"
|
||||
#include "Project64-core/N64System/Mips/R4300iOpcode.h"
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "stdafx.h"
|
||||
#include "Breakpoints.h"
|
||||
|
||||
#include <Project64-core/N64System/Mips/Register.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include "Breakpoints.h"
|
||||
#include <Project64-core/N64System/Mips/R4300iInstruction.h>
|
||||
#include <Project64-core/N64System/Mips/Register.h>
|
||||
#include <Project64-core/N64System/N64System.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
|
||||
CBreakpoints::CBreakpoints() :
|
||||
m_bHaveRegBP(false),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "CPULog.h"
|
||||
#include <Project64-core/N64System/Mips/R4300iInstruction.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t pc;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DMALog.h"
|
||||
|
||||
void CDMALog::AddEntry(uint32_t romAddr, uint32_t ramAddr, uint32_t length)
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
|
||||
struct DMALOGENTRY
|
||||
{
|
||||
uint32_t romAddr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "DebugMMU.h"
|
||||
#include <Common/MemoryManagement.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include <stdafx.h>
|
||||
|
||||
class CDebugMMU
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include "CPULog.h"
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include "Debugger-CPULogView.h"
|
||||
#include <Project64-core/N64System/Mips/R4300iInstruction.h>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
class CDebugCPULogView :
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include "Symbols.h"
|
||||
#include "Breakpoints.h"
|
||||
#include "Assembler.h"
|
||||
#include "Breakpoints.h"
|
||||
#include "OpInfo.h"
|
||||
#include "Symbols.h"
|
||||
|
||||
#include <Project64-core/N64System/Mips/R4300iInstruction.h>
|
||||
|
||||
|
@ -737,7 +738,8 @@ LRESULT CDebugCommandsView::OnCustomDrawList(NMHDR* pNMHDR)
|
|||
R4300iOpcode & OpCode = OpInfo.m_OpCode;
|
||||
bool bAddrOkay = m_Debugger->DebugLoad_VAddr(address, OpCode.Value);
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
COLORREF bg;
|
||||
COLORREF fg;
|
||||
} colors;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include "DMALog.h"
|
||||
#include "DebuggerUI.h"
|
||||
#include <fstream>
|
||||
|
||||
CDebugDMALogView::CDebugDMALogView(CDebuggerUI * debugger) :
|
||||
|
@ -354,7 +355,6 @@ LRESULT CDebugDMALogView::OnRomAddrChanged(WORD /*wNotifyCode*/, WORD /*wID*/, H
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
LRESULT CDebugDMALogView::OnCustomDrawList(NMHDR * pNMHDR)
|
||||
{
|
||||
NMLVCUSTOMDRAW * pLVCD = reinterpret_cast<NMLVCUSTOMDRAW *>(pNMHDR);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
class CDebugDMALogView :
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
CDebugExcBreakpoints::ExcCheckboxMeta CDebugExcBreakpoints::ExcCheckboxMap[] = {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
#include "MemoryScanner.h"
|
||||
|
||||
|
@ -2063,11 +2064,21 @@ void CDebugMemorySearch::LoadWatchList(void)
|
|||
|
||||
char *szAddrType, *szAddress, *szValueType, *szDisplayFormat, *szDescription;
|
||||
|
||||
szAddrType = p; p = strchr(p, ','); *p++ = '\0';
|
||||
szAddress = p; p = strchr(p, ','); *p++ = '\0';
|
||||
szValueType = p; p = strchr(p, ','); *p++ = '\0';
|
||||
szDisplayFormat = p; p = strchr(p, ','); *p++ = '\0';
|
||||
szDescription = p; p = strchr(p, '\n'); *p++ = '\0';
|
||||
szAddrType = p;
|
||||
p = strchr(p, ',');
|
||||
*p++ = '\0';
|
||||
szAddress = p;
|
||||
p = strchr(p, ',');
|
||||
*p++ = '\0';
|
||||
szValueType = p;
|
||||
p = strchr(p, ',');
|
||||
*p++ = '\0';
|
||||
szDisplayFormat = p;
|
||||
p = strchr(p, ',');
|
||||
*p++ = '\0';
|
||||
szDescription = p;
|
||||
p = strchr(p, '\n');
|
||||
*p++ = '\0';
|
||||
|
||||
switch (szAddrType[0])
|
||||
{
|
||||
|
@ -2122,7 +2133,6 @@ void CDebugMemorySearch::LoadWatchList(void)
|
|||
|
||||
parse_error:
|
||||
delete[] szWlFile;
|
||||
|
||||
}
|
||||
|
||||
void CDebugMemorySearch::FixListHeader(CListViewCtrl & listCtrl)
|
||||
|
@ -2517,7 +2527,6 @@ bool CEditMixed::GetValueHexString(const wchar_t*& value, int& length)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
char * hexString = new char[numBytes];
|
||||
wchar_t * wchexString = new wchar_t[numBytes];
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
|
||||
struct FieldPair
|
||||
{
|
||||
|
|
|
@ -631,7 +631,6 @@ INT_PTR CALLBACK CRegisterTabs::TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, L
|
|||
HWND hWnd = (HWND)lParam;
|
||||
WORD ctrlId = (WORD)::GetWindowLong(hWnd, GWL_ID);
|
||||
|
||||
|
||||
HDC hdc = (HDC)wParam;
|
||||
|
||||
COLORREF colorRead = RGB(200, 200, 255);
|
||||
|
@ -827,7 +826,8 @@ void CRegisterTabs::ZeroRegisterEdits64(CEditReg64* edits, uint32_t ctrlIdsCount
|
|||
}
|
||||
}
|
||||
|
||||
void CRegisterTabs::CopyTabRegisters() {
|
||||
void CRegisterTabs::CopyTabRegisters()
|
||||
{
|
||||
int nPage = GetCurSel();
|
||||
stdstr str = CopyTabRegisters(nPage);
|
||||
|
||||
|
@ -840,9 +840,11 @@ void CRegisterTabs::CopyTabRegisters() {
|
|||
CloseClipboard();
|
||||
}
|
||||
|
||||
void CRegisterTabs::CopyAllRegisters() {
|
||||
void CRegisterTabs::CopyAllRegisters()
|
||||
{
|
||||
stdstr str;
|
||||
for (int i = 0; i <= 12; i++) {
|
||||
for (int i = 0; i <= 12; i++)
|
||||
{
|
||||
if (!str.empty()) str += "\r\n";
|
||||
str += CopyTabRegisters(i);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
CDebugScripts::CDebugScripts(CDebuggerUI * debugger) :
|
||||
|
@ -440,9 +441,8 @@ LRESULT CDebugScripts::OnRefreshList(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
|
|||
}
|
||||
} while (searchPath.FindNext());
|
||||
|
||||
fileNames.sort([](stdstr a, stdstr b) {
|
||||
return a.ToLower() < b.ToLower();
|
||||
});
|
||||
fileNames.sort([](stdstr a, stdstr b)
|
||||
{ return a.ToLower() < b.ToLower(); });
|
||||
|
||||
m_ScriptList.SetRedraw(false);
|
||||
m_ScriptList.DeleteAllItems();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
#include <sstream>
|
||||
|
||||
|
@ -69,7 +70,6 @@ LRESULT CScriptsAutorunDlg::OnOKCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LRESULT CScriptsAutorunDlg::OnAdd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL & /*bHandled*/)
|
||||
{
|
||||
m_bScriptListNeedsRefocus = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
#include "Symbols.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Common/path.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "Symbols.h"
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/ExceptionHandler.h>
|
||||
|
||||
#include <Common/MemoryManagement.h>
|
||||
#include <Project64-core/ExceptionHandler.h>
|
||||
|
||||
#include <UserInterface/WTLControls/HexEditCtrl.h>
|
||||
|
||||
#include "DMALog.h"
|
||||
#include "DebuggerUI.h"
|
||||
#include "Symbols.h"
|
||||
#include "DMALog.h"
|
||||
|
||||
CDebugMemoryView::jump_item_t CDebugMemoryView::JumpItems[] = {
|
||||
{0x80000000, 0x00000000, 0x0800000, "RDRAM"},
|
||||
|
@ -217,7 +218,6 @@ void CDebugMemoryView::FollowPointer(bool bContextMenuAddress)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void CDebugMemoryView::JumpToSelection(void)
|
||||
{
|
||||
uint32_t startAddress, endAddress;
|
||||
|
@ -1005,7 +1005,6 @@ LRESULT CDebugMemoryView::OnHxPaste(LPNMHDR lpNMHDR)
|
|||
return retDataLength;
|
||||
}
|
||||
|
||||
|
||||
LRESULT CDebugMemoryView::OnTabSelChange(LPNMHDR /*lpNMHDR*/)
|
||||
{
|
||||
TabSelChanged();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DebuggerUI.h"
|
||||
|
||||
#include "CPULog.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "MemoryScanner.h"
|
||||
|
||||
CMixed::TypeNameEntry CMixed::TypeNames[] = {
|
||||
|
@ -599,7 +600,6 @@ uint8_t* CMemoryScanner::GetMemoryPool(uint32_t physAddr)
|
|||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool CMemoryScanner::SetValueType(ValueType type)
|
||||
|
@ -976,7 +976,6 @@ bool CMemoryScanner::NextScan()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
int CMemoryScanner::HexDigitVal(char c)
|
||||
{
|
||||
if (c >= '0' && c <= '9') return (c - '0');
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
#include <string>
|
||||
|
||||
enum ValueType
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdafx.h>
|
||||
|
||||
#include <Project64-core/N64System/Mips/R4300iOpcode.h>
|
||||
|
||||
class COpInfo
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "JSIntervalWorker.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "../ScriptInstance.h"
|
||||
#include "JSIntervalWorker.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
CJSIntervalWorker::CJSIntervalWorker(CScriptInstance * inst, void * dukObjectHeapPtr, int delayMS, bool bOnce) :
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "JSServerWorker.h"
|
||||
#include "JSSocketWorker.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "JSSocketWorker.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
|
@ -365,12 +366,14 @@ void CJSSocketWorker::UpdateAddresses()
|
|||
sockaddr * pLocalAddr = nullptr;
|
||||
sockaddr * pRemoteAddr = nullptr;
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
sockaddr_in ipv4;
|
||||
sockaddr_in6 ipv6;
|
||||
} localAddr;
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
sockaddr_in ipv4;
|
||||
sockaddr_in6 ipv6;
|
||||
} remoteAddr;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "N64Image.h"
|
||||
|
||||
struct ImgFormatInfo {
|
||||
struct ImgFormatInfo
|
||||
{
|
||||
int bitsPerPixel;
|
||||
int paletteColorCount;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
enum {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <stdafx.h>
|
||||
#include <3rdParty/png/png.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "N64Image.h"
|
||||
#include <3rdParty/png/png.h>
|
||||
|
||||
#pragma warning(disable : 4611) // disable setjmp/c++ deconstruction warning
|
||||
|
||||
struct PNGReadState {
|
||||
struct PNGReadState
|
||||
{
|
||||
uint8_t * pngData;
|
||||
size_t pngSize;
|
||||
png_size_t offset;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <stdafx.h>
|
||||
#include <dwrite.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "N64Image.h"
|
||||
#include "ScriptAPI.h"
|
||||
#include <dwrite.h>
|
||||
|
||||
#pragma warning(disable : 4702) // disable unreachable code warning
|
||||
|
||||
|
@ -975,8 +976,7 @@ const char* ScriptAPI::ArgTypeName(ArgType argType)
|
|||
{Arg_Function, "function"},
|
||||
{Arg_Object, "object"},
|
||||
{Arg_Array, "array"},
|
||||
{ Arg_Boolean, "boolean" }
|
||||
};
|
||||
{Arg_Boolean, "boolean"}};
|
||||
|
||||
if (argTypeNames.count(argType) == 0)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
#pragma warning(disable : 4702) // disable unreachable code warning
|
||||
|
@ -17,7 +18,11 @@ void ScriptAPI::Define_AddressRange(duk_context* ctx)
|
|||
|
||||
DefineGlobalClass(ctx, "AddressRange", js_AddressRange__constructor, prototype);
|
||||
|
||||
struct { const char* key; uint32_t start, end; } ranges[] = {
|
||||
struct
|
||||
{
|
||||
const char * key;
|
||||
uint32_t start, end;
|
||||
} ranges[] = {
|
||||
{"ADDR_ANY", 0x00000000, 0xFFFFFFFF},
|
||||
{"ADDR_ANY_KUSEG", 0x00000000, 0x7FFFFFFF},
|
||||
{"ADDR_ANY_KSEG0", 0x80000000, 0x9FFFFFFF},
|
||||
|
@ -108,7 +113,8 @@ duk_ret_t ScriptAPI::js_AddressRange_offset(duk_context* ctx)
|
|||
duk_push_this(ctx);
|
||||
GetRange(ctx, -1, &start, &end);
|
||||
|
||||
if (address < start || address > end) {
|
||||
if (address < start || address > end)
|
||||
{
|
||||
duk_push_error_object(ctx, DUK_ERR_RANGE_ERROR, "address out of bounds");
|
||||
return duk_throw(ctx);
|
||||
}
|
||||
|
@ -129,7 +135,8 @@ duk_ret_t ScriptAPI::js_AddressRange_address(duk_context* ctx)
|
|||
|
||||
duk_uint_t address = start + offset;
|
||||
|
||||
if (address < start || address > end) {
|
||||
if (address < start || address > end)
|
||||
{
|
||||
duk_push_error_object(ctx, DUK_ERR_RANGE_ERROR, "offset out of bounds");
|
||||
return duk_throw(ctx);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "N64Image.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
#pragma warning(disable : 4702) // disable unreachable code warning
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
void ScriptAPI::Define_Number_prototype_hex(duk_context * ctx)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "JSServerWorker.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
static CJSServerWorker * GetThisServer(duk_context * ctx);
|
||||
|
||||
|
@ -34,12 +35,7 @@ duk_ret_t ScriptAPI::js_Server__constructor(duk_context* ctx)
|
|||
duk_push_this(ctx);
|
||||
void * objectHeapPtr = duk_get_heapptr(ctx, -1);
|
||||
|
||||
InitEmitter(ctx, -1, {
|
||||
"close",
|
||||
"connection",
|
||||
"error",
|
||||
"listening"
|
||||
});
|
||||
InitEmitter(ctx, -1, {"close", "connection", "error", "listening"});
|
||||
|
||||
duk_push_c_function(ctx, js_Server__finalizer, 1);
|
||||
duk_set_finalizer(ctx, -2);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "JSSocketWorker.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
#pragma warning(disable : 4702) // disable unreachable code warning
|
||||
|
||||
|
@ -55,15 +56,7 @@ duk_ret_t ScriptAPI::js_Socket__constructor(duk_context* ctx)
|
|||
duk_push_this(ctx);
|
||||
void * objectHeapPtr = duk_get_heapptr(ctx, -1);
|
||||
|
||||
InitEmitter(ctx, -1, {
|
||||
"data",
|
||||
"end",
|
||||
"connect",
|
||||
"error",
|
||||
"close",
|
||||
"drain",
|
||||
"lookup"
|
||||
});
|
||||
InitEmitter(ctx, -1, {"data", "end", "connect", "error", "close", "drain", "lookup"});
|
||||
|
||||
duk_push_uint(ctx, 0);
|
||||
duk_put_prop_string(ctx, -2, HS_socketNextWriteCallbackId);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include <windows.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <windows.h>
|
||||
|
||||
void ScriptAPI::Define_alert(duk_context * ctx)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "../Assembler.h"
|
||||
#include "ScriptAPI.h"
|
||||
#include <Project64-core/N64System/Mips/R4300iInstruction.h>
|
||||
|
||||
void ScriptAPI::Define_asm(duk_context * ctx)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include <windows.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <windows.h>
|
||||
|
||||
static void ConcatArgs(duk_context * ctx, stdstr & out);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <Project64-core/N64System/Mips/Register.h>
|
||||
|
||||
|
@ -28,7 +29,8 @@ void ScriptAPI::Define_cpu(duk_context* ctx)
|
|||
{ nullptr, nullptr, 0 } \
|
||||
}
|
||||
|
||||
const struct {
|
||||
const struct
|
||||
{
|
||||
const char * key;
|
||||
const duk_function_list_entry functions[3];
|
||||
} proxies[] = {
|
||||
|
@ -410,7 +412,8 @@ static uint32_t* COP0RegPtr(const char *regName)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
const char * name;
|
||||
uint32_t * ptr;
|
||||
} names[] = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <Project64-core/Settings/DebugSettings.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "../OpInfo.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
#pragma warning(disable : 4702) // disable unreachable code warning
|
||||
|
||||
|
@ -404,7 +405,8 @@ duk_idx_t CbArgs_ReadEventObject(duk_context* ctx, void* _env)
|
|||
|
||||
DukPutPropList(ctx, -1, props);
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8_t u8;
|
||||
int8_t s8;
|
||||
uint16_t u16;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include <windows.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <windows.h>
|
||||
|
||||
void ScriptAPI::Define_exec(duk_context * ctx)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "JSIntervalWorker.h"
|
||||
#include "ScriptAPI.h"
|
||||
|
||||
using namespace ScriptAPI;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <Project64/UserInterface/Debugger/debugger.h>
|
||||
#include <Project64/UserInterface/Debugger/DebugMMU.h>
|
||||
#include <Project64/UserInterface/Debugger/debugger.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -269,7 +270,8 @@ duk_ret_t ScriptAPI::js_mem__boundget(duk_context *ctx)
|
|||
uint32_t addr = duk_get_uint(ctx, 0);
|
||||
duk_int_t type = duk_get_int(ctx, 1);
|
||||
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8_t u8;
|
||||
uint16_t u16;
|
||||
uint32_t u32;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI.h"
|
||||
#include <Project64/UserInterface/DiscordRPC.h>
|
||||
#include <Project64/UserInterface/MainWindow.h>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptTypes.h"
|
||||
#include "ScriptInstance.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptAPI/ScriptAPI.h"
|
||||
#include "ScriptInstance.h"
|
||||
#include "ScriptTypes.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
int DukTimeoutCheck(void * udata)
|
||||
{
|
||||
CScriptInstance * inst = (CScriptInstance *)udata;
|
||||
|
@ -115,7 +117,6 @@ bool CScriptInstance::Run(const char* path)
|
|||
|
||||
return true;
|
||||
|
||||
|
||||
error_cleanup:
|
||||
Cleanup();
|
||||
return false;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include <stdafx.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sstream>
|
||||
#include "ScriptTypes.h"
|
||||
#include "ScriptSystem.h"
|
||||
#include "ScriptInstance.h"
|
||||
#include "ScriptAPI/ScriptAPI.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "Debugger.h"
|
||||
#include "Project64\UserInterface\DiscordRPC.h"
|
||||
#include "ScriptAPI/ScriptAPI.h"
|
||||
#include "ScriptInstance.h"
|
||||
#include "ScriptSystem.h"
|
||||
#include "ScriptTypes.h"
|
||||
#include <sstream>
|
||||
#include <sys/stat.h>
|
||||
|
||||
CScriptSystem::CScriptSystem(CDebuggerUI * debugger) :
|
||||
m_Debugger(debugger),
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdafx.h>
|
||||
#include "ScriptWorker.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "ScriptInstance.h"
|
||||
#include "ScriptWorker.h"
|
||||
|
||||
CScriptWorker::CScriptWorker(CScriptInstance * instance, void * dukObjectHeapPtr) :
|
||||
m_bStopping(false),
|
||||
|
@ -21,7 +22,8 @@ CScriptWorker::~CScriptWorker()
|
|||
}
|
||||
}
|
||||
|
||||
DWORD WINAPI CScriptWorker::ThreadProc(void* _this) {
|
||||
DWORD WINAPI CScriptWorker::ThreadProc(void * _this)
|
||||
{
|
||||
((CScriptWorker *)_this)->WorkerProc();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "Symbols.h"
|
||||
|
||||
CSymbolTable::CSymbolTable(CDebuggerUI * debugger) :
|
||||
|
@ -356,21 +357,24 @@ void CSymbolTable::GetValueString(char* dst, CSymbol* symbol)
|
|||
sprintf(dst, "%f", value.f64);
|
||||
break;
|
||||
case SYM_VECTOR2:
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
m_Debugger->DebugLoad_VAddr(address + (i * sizeof(float)), value.f32);
|
||||
xyzw[i] = value.f32;
|
||||
}
|
||||
sprintf(dst, "%f, %f", xyzw[0], xyzw[1]);
|
||||
break;
|
||||
case SYM_VECTOR3:
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
m_Debugger->DebugLoad_VAddr(address + (i * sizeof(float)), value.f32);
|
||||
xyzw[i] = value.f32;
|
||||
}
|
||||
sprintf(dst, "%f, %f, %f", xyzw[0], xyzw[1], xyzw[2]);
|
||||
break;
|
||||
case SYM_VECTOR4:
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
m_Debugger->DebugLoad_VAddr(address + (i * sizeof(float)), value.f32);
|
||||
xyzw[i] = value.f32;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include "stdafx.h"
|
||||
|
||||
class CSymbol;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
#include <3rdParty\discord-rpc\include\discord_rpc.h>
|
||||
|
||||
#include "DiscordRPC.h"
|
||||
#include <3rdParty\discord-rpc\include\discord_rpc.h>
|
||||
|
||||
#define UNIX_TIME_START 0x019DB1DED53E8000
|
||||
#define TICKS_PER_SECOND 10000000
|
||||
|
@ -27,9 +28,11 @@ static stdstr GetTitle()
|
|||
bool existsInRdb = g_Settings->LoadStringVal(Rdb_GoodName, Default);
|
||||
if (existsInRdb)
|
||||
return g_Settings->LoadStringVal(Rdb_GoodName);
|
||||
else {
|
||||
else
|
||||
{
|
||||
Default = CPath(g_Settings->LoadStringVal(Game_File)).GetName().c_str();
|
||||
if (strstr(const_cast<char*>(Default.c_str()), "?") != nullptr) {
|
||||
if (strstr(const_cast<char *>(Default.c_str()), "?") != nullptr)
|
||||
{
|
||||
return Default.substr(Default.find("?") + 1);
|
||||
}
|
||||
return Default;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <Project64\UserInterface\EnhancementUI.h>
|
||||
#include <Project64-core/N64System/Enhancement/Enhancements.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <Project64-core/Logging.h>
|
||||
#include <Project64-core/Settings/LoggingSettings.h>
|
||||
#include <prsht.h>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include "stdafx.h"
|
||||
#include "RomInformation.h"
|
||||
|
||||
#include "Debugger/Breakpoints.h"
|
||||
#include "Debugger/ScriptSystem.h"
|
||||
#include "DiscordRPC.h"
|
||||
#include "RomInformation.h"
|
||||
#include <Project64-core/N64System/N64Disk.h>
|
||||
#include <Project64\UserInterface\About.h>
|
||||
#include <windows.h>
|
||||
#include <commdlg.h>
|
||||
#include <windows.h>
|
||||
|
||||
CMainMenu::CMainMenu(CMainGui * hMainWindow) :
|
||||
CBaseMenu(),
|
||||
|
@ -348,7 +349,9 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
|
|||
g_BaseSystem->ExternalEvent(g_Settings->LoadBool(GameRunning_CPU_Paused) ? SysEvent_ResumeCPU_FromMenu : SysEvent_PauseCPU_FromMenu);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "ID_SYSTEM_PAUSE 1");
|
||||
break;
|
||||
case ID_SYSTEM_BITMAP: OnScreenShot(); break;
|
||||
case ID_SYSTEM_BITMAP:
|
||||
OnScreenShot();
|
||||
break;
|
||||
break;
|
||||
case ID_SYSTEM_LIMITFPS:
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "ID_SYSTEM_LIMITFPS");
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "DiscordRPC.h"
|
||||
#include "RomInformation.h"
|
||||
#include <Project64\UserInterface\About.h>
|
||||
#include <commctrl.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
#include <Project64-core/N64System/Enhancement/Enhancements.h>
|
||||
#include <Project64-core/N64System/N64Disk.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
#include <Project64/UserInterface/Debugger/DebuggerUI.h>
|
||||
#include "DiscordRPC.h"
|
||||
#include <Project64\UserInterface\About.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
void EnterLogOptions(HWND hwndOwner);
|
||||
|
||||
|
@ -387,8 +388,7 @@ void CMainGui::Caption(LPCWSTR Caption)
|
|||
void CMainGui::Create(const char * WindowTitle)
|
||||
{
|
||||
stdstr_f VersionDisplay("Project64 %s", VER_FILE_VERSION_STR);
|
||||
m_hMainWindow = CreateWindowEx(WS_EX_ACCEPTFILES, VersionDisplay.ToUTF16().c_str(), stdstr(WindowTitle).ToUTF16().c_str(), WS_OVERLAPPED | WS_CLIPCHILDREN |
|
||||
WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX, 5, 5, 640, 480,
|
||||
m_hMainWindow = CreateWindowEx(WS_EX_ACCEPTFILES, VersionDisplay.ToUTF16().c_str(), stdstr(WindowTitle).ToUTF16().c_str(), WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX, 5, 5, 640, 480,
|
||||
nullptr, nullptr, GetModuleHandle(nullptr), this);
|
||||
m_Created = m_hMainWindow != nullptr;
|
||||
}
|
||||
|
@ -616,7 +616,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
}
|
||||
break;
|
||||
case WM_SYSCOMMAND:
|
||||
switch (wParam) {
|
||||
switch (wParam)
|
||||
{
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
{
|
||||
|
@ -774,7 +775,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
{
|
||||
if (g_BaseSystem)
|
||||
{
|
||||
if (g_Plugins && g_Plugins->Control()->WM_KeyUp) {
|
||||
if (g_Plugins && g_Plugins->Control()->WM_KeyUp)
|
||||
{
|
||||
g_Plugins->Control()->WM_KeyUp(wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
@ -832,7 +834,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
g_BaseSystem->ExternalEvent(SysEvent_PauseCPU_AppLostFocus);
|
||||
}
|
||||
|
||||
if (g_Plugins && g_Plugins->Control()->WM_KillFocus) {
|
||||
if (g_Plugins && g_Plugins->Control()->WM_KillFocus)
|
||||
{
|
||||
g_Plugins->Control()->WM_KillFocus(wParam, lParam);
|
||||
}
|
||||
}
|
||||
|
@ -965,7 +968,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
case WM_LBUTTONDOWN:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
if (g_Settings->LoadBool(Debugger_Enabled)) {
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
SetCapture(hWnd);
|
||||
CDebuggerUI * debugger = (CDebuggerUI *)g_Debugger;
|
||||
debugger->ScriptSystem()->DoMouseEvent(JS_HOOK_MOUSEDOWN,
|
||||
|
@ -975,7 +979,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
case WM_LBUTTONUP:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_RBUTTONUP:
|
||||
if (g_Settings->LoadBool(Debugger_Enabled)) {
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
ReleaseCapture();
|
||||
CDebuggerUI * debugger = (CDebuggerUI *)g_Debugger;
|
||||
debugger->ScriptSystem()->DoMouseEvent(JS_HOOK_MOUSEUP,
|
||||
|
@ -983,7 +988,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
}
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
if (g_Settings->LoadBool(Debugger_Enabled)) {
|
||||
if (g_Settings->LoadBool(Debugger_Enabled))
|
||||
{
|
||||
static int lastX = 0;
|
||||
static int lastY = 0;
|
||||
int x = GET_X_LPARAM(lParam);
|
||||
|
@ -1002,7 +1008,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
CMainGui * _this = (CMainGui *)GetProp(hWnd, L"Class");
|
||||
if (_this == nullptr) { break; }
|
||||
|
||||
switch (LOWORD(wParam)) {
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case ID_POPUPMENU_PLAYGAME:
|
||||
{
|
||||
if ((CPath(_this->CurrentedSelectedRom()).GetExtension() != "ndd") && (CPath(_this->CurrentedSelectedRom()).GetExtension() != "d64"))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
CNotificationImp & Notify(void)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <Common/md5.h>
|
||||
#include <Wininet.h>
|
||||
#include <time.h>
|
||||
#include <windows.h>
|
||||
#include <Wininet.h>
|
||||
|
||||
#pragma comment(lib, "Wininet.lib")
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <Project64/Settings/UISettings.h>
|
||||
|
||||
#include <commctrl.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "RomInformation.h"
|
||||
#include <Project64-core/N64System/N64Disk.h>
|
||||
|
||||
|
|
|
@ -64,7 +64,10 @@ void CAdvancedOptionsPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CAdvancedOptionsPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CAdvancedOptionsPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CAdvancedOptionsPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CDefaultsOptionsPage::CDefaultsOptionsPage(HWND hParent, const RECT & rcDispay)
|
||||
|
@ -89,7 +90,10 @@ void CDefaultsOptionsPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CDefaultsOptionsPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CDefaultsOptionsPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CDefaultsOptionsPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,35 +94,50 @@ void COptionsDirectoriesPage::SelectDirectory(LanguageStringID Title, CModifiedE
|
|||
|
||||
void COptionsDirectoriesPage::PluginDirChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_PluginDir.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void COptionsDirectoriesPage::AutoSaveDirChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_AutoSaveDir.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void COptionsDirectoriesPage::InstantSaveDirChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_InstantSaveDir.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void COptionsDirectoriesPage::SnapShotDirChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_ScreenShotDir.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void COptionsDirectoriesPage::TextureDirChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_TextureDir.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
@ -312,16 +327,46 @@ void COptionsDirectoriesPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool COptionsDirectoriesPage::EnableReset(void)
|
||||
{
|
||||
if (m_PluginDir.IsChanged()) { return true; }
|
||||
if (m_AutoSaveDir.IsChanged()) { return true; }
|
||||
if (m_InstantSaveDir.IsChanged()) { return true; }
|
||||
if (m_ScreenShotDir.IsChanged()) { return true; }
|
||||
if (m_TextureDir.IsChanged()) { return true; }
|
||||
if (m_PluginDefault.IsChanged()) { return true; }
|
||||
if (m_AutoSaveDefault.IsChanged()) { return true; }
|
||||
if (m_InstantDefault.IsChanged()) { return true; }
|
||||
if (m_ScreenShotDefault.IsChanged()) { return true; }
|
||||
if (m_TextureDefault.IsChanged()) { return true; }
|
||||
if (m_PluginDir.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_AutoSaveDir.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_InstantSaveDir.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_ScreenShotDir.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_TextureDir.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_PluginDefault.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_AutoSaveDefault.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_InstantDefault.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_ScreenShotDefault.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (m_TextureDefault.IsChanged())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,10 @@ void CDiskDrivePage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CDiskDrivePage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CDiskDrivePage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CDiskDrivePage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -100,21 +103,30 @@ void CDiskDrivePage::SelectIplDirTl(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
|||
|
||||
void CDiskDrivePage::IplDirJpChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_IplDirJp.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void CDiskDrivePage::IplDirUsChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_IplDirUs.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
||||
void CDiskDrivePage::IplDirTlChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
|
||||
{
|
||||
if (m_InUpdateSettings) { return; }
|
||||
if (m_InUpdateSettings)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_IplDirTl.SetChanged(true);
|
||||
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
#include "SettingsPage-Game-DiskDrive.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CGameDiskDrivePage::CGameDiskDrivePage(HWND hParent, const RECT & rcDispay)
|
||||
{
|
||||
|
@ -42,7 +42,10 @@ void CGameDiskDrivePage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGameDiskDrivePage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGameDiskDrivePage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGameDiskDrivePage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../WTLControls/ModifiedCheckBox.h"
|
||||
#include "SettingsPage.h"
|
||||
#include <Project64\UserInterface\WTLControls\ModifiedCheckBox.h>
|
||||
#include <Project64-core/N64System/N64Types.h>
|
||||
|
||||
class CGameDiskDrivePage :
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
#include "SettingsPage-Game-General.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CGameGeneralPage::CGameGeneralPage(HWND hParent, const RECT & rcDispay)
|
||||
{
|
||||
|
@ -106,7 +106,10 @@ void CGameGeneralPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGameGeneralPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGameGeneralPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGameGeneralPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "../WTLControls/ModifiedCheckBox.h"
|
||||
#include <Project64\UserInterface\WTLControls\ModifiedCheckBox.h>
|
||||
#include <Project64-core/N64System/N64Types.h>
|
||||
#include "SettingsPage.h"
|
||||
|
||||
class CGameGeneralPage :
|
||||
public CSettingsPageImpl<CGameGeneralPage>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
#include "SettingsPage-Game-Plugin.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CGamePluginPage::CGamePluginPage(HWND hParent, const RECT & rcDispay)
|
||||
{
|
||||
|
@ -190,7 +190,8 @@ void CGamePluginPage::UpdatePageSettings(void)
|
|||
ComboBox->SetDefault((WPARAM)Plugin);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
ComboBox->SetDefault(NULL);
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +218,10 @@ void CGamePluginPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGamePluginPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGamePluginPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGamePluginPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -254,7 +258,8 @@ void CGamePluginPage::ApplyComboBoxes(void)
|
|||
g_Settings->SaveString(cb_iter->first, Plugin->FileName.c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
g_Settings->DeleteSetting(cb_iter->first);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <Project64-core/Plugin.h>
|
||||
#include <Project64/Plugins/PluginList.h>
|
||||
#include "SettingsPage.h"
|
||||
|
||||
class CGamePluginPage :
|
||||
public CSettingsPageImpl<CGamePluginPage>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
#include "SettingsPage-Game-Recompiler.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CGameRecompilePage::CGameRecompilePage(HWND hParent, const RECT & rcDispay)
|
||||
{
|
||||
|
@ -76,7 +76,10 @@ void CGameRecompilePage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGameRecompilePage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGameRecompilePage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGameRecompilePage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include "SettingsPage.h"
|
||||
|
||||
class CGameRecompilePage :
|
||||
public CSettingsPageImpl<CGameRecompilePage>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsPage.h"
|
||||
#include "SettingsPage-Game-Status.h"
|
||||
#include "SettingsPage.h"
|
||||
|
||||
CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
|
||||
{
|
||||
|
@ -21,8 +21,14 @@ CGameStatusPage::CGameStatusPage(HWND hParent, const RECT & rcDispay)
|
|||
{
|
||||
for (CIniFile::strlist::iterator item = Keys.begin(); item != Keys.end(); item++)
|
||||
{
|
||||
if (strstr(item->c_str(), ".Sel") != nullptr) { continue; }
|
||||
if (strstr(item->c_str(), ".Auto") != nullptr) { continue; }
|
||||
if (strstr(item->c_str(), ".Sel") != nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (strstr(item->c_str(), ".Auto") != nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ComboBox->AddItem(stdstr(*item).ToUTF16().c_str(), item->c_str());
|
||||
}
|
||||
ComboBox->SetTextField(GetDlgItem(IDC_STATUS_TEXT));
|
||||
|
@ -53,7 +59,10 @@ void CGameStatusPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGameStatusPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGameStatusPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGameStatusPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include "SettingsPage.h"
|
||||
|
||||
class CGameStatusPage :
|
||||
public CSettingsPageImpl<CGameStatusPage>,
|
||||
|
|
|
@ -54,7 +54,10 @@ void COptionsGameBrowserPage::UpdateFieldList(const ROMBROWSER_FIELDS_LIST & Fie
|
|||
continue;
|
||||
}
|
||||
int listCount = m_Using.GetCount();
|
||||
if (Pos > listCount) { Pos = listCount; }
|
||||
if (Pos > listCount)
|
||||
{
|
||||
Pos = listCount;
|
||||
}
|
||||
m_Using.SetItemData(m_Using.InsertString(Pos, wGS(Fields[i].LangID()).c_str()), i);
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +102,10 @@ void COptionsGameBrowserPage::AddFieldClicked(UINT /*Code*/, int /*id*/, HWND /*
|
|||
|
||||
// Select next in list
|
||||
int listCount = m_Avaliable.GetCount();
|
||||
if (index >= listCount) { index -= 1; }
|
||||
if (index >= listCount)
|
||||
{
|
||||
index -= 1;
|
||||
}
|
||||
m_Avaliable.SetCurSel(index);
|
||||
|
||||
// Add to list
|
||||
|
@ -125,7 +131,10 @@ void COptionsGameBrowserPage::RemoveFieldClicked(UINT /*Code*/, int /*id*/, HWND
|
|||
|
||||
// Select next in list
|
||||
int listCount = m_Using.GetCount();
|
||||
if (index >= listCount) { index -= 1; }
|
||||
if (index >= listCount)
|
||||
{
|
||||
index -= 1;
|
||||
}
|
||||
m_Using.SetCurSel(index);
|
||||
|
||||
// Add to list
|
||||
|
@ -231,7 +240,10 @@ void COptionsGameBrowserPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool COptionsGameBrowserPage::EnableReset(void)
|
||||
{
|
||||
if (m_OrderChanged) { return true; }
|
||||
if (m_OrderChanged)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return CSettingsPageImpl<COptionsGameBrowserPage>::EnableReset();
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,10 @@ void COptionsShortCutsPage::OnShortCutChanged(UINT /*Code*/, int /*id*/, HWND /*
|
|||
{
|
||||
// Get the virtual key info
|
||||
int index = m_VirtualKeyList.GetCurSel();
|
||||
if (index < 0) { return; }
|
||||
if (index < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
WORD key = (WORD)m_VirtualKeyList.GetItemData(index);
|
||||
bool bCtrl = (SendDlgItemMessage(IDC_CTL, BM_GETCHECK, 0, 0) == BST_CHECKED);
|
||||
bool bAlt = (SendDlgItemMessage(IDC_ALT, BM_GETCHECK, 0, 0) == BST_CHECKED);
|
||||
|
@ -297,22 +300,39 @@ void COptionsShortCutsPage::InputGetKeys(void)
|
|||
::EnableWindow(GetParent(), false);
|
||||
MSG msg;
|
||||
|
||||
for (bool fDone = false; !fDone; MsgWaitForMultipleObjects(0, nullptr, false, 45, QS_ALLINPUT)) {
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
|
||||
if (msg.message == WM_QUIT) {
|
||||
for (bool fDone = false; !fDone; MsgWaitForMultipleObjects(0, nullptr, false, 45, QS_ALLINPUT))
|
||||
{
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (msg.message == WM_QUIT)
|
||||
{
|
||||
fDone = true;
|
||||
::PostMessage(nullptr, WM_QUIT, 0, 0);
|
||||
break;
|
||||
}
|
||||
if (msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN) {
|
||||
if (msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN)
|
||||
{
|
||||
int nVirtKey = (int)msg.wParam;
|
||||
if (nVirtKey == VK_SHIFT) { continue; }
|
||||
if (nVirtKey == VK_CONTROL) { continue; }
|
||||
if (nVirtKey == VK_MENU) { continue; }
|
||||
if (nVirtKey == VK_SHIFT)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (nVirtKey == VK_CONTROL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (nVirtKey == VK_MENU)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
SendDlgItemMessage(IDC_VIRTUALKEY, CB_SETCURSEL, (WPARAM)-1, 0);
|
||||
for (int count = 0; count < SendDlgItemMessage(IDC_VIRTUALKEY, CB_GETCOUNT, 0, 0); count++) {
|
||||
for (int count = 0; count < SendDlgItemMessage(IDC_VIRTUALKEY, CB_GETCOUNT, 0, 0); count++)
|
||||
{
|
||||
int Data = (int)SendDlgItemMessage(IDC_VIRTUALKEY, CB_GETITEMDATA, count, 0);
|
||||
if (Data != nVirtKey) { continue; }
|
||||
if (Data != nVirtKey)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
SendDlgItemMessage(IDC_VIRTUALKEY, CB_SETCURSEL, count, 0);
|
||||
SendDlgItemMessage(IDC_CTL, BM_SETCHECK, (GetKeyState(VK_CONTROL) & 0x80) != 0 ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
SendDlgItemMessage(IDC_ALT, BM_SETCHECK, (GetKeyState(VK_MENU) & 0x80) != 0 ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
@ -323,13 +343,17 @@ void COptionsShortCutsPage::InputGetKeys(void)
|
|||
}
|
||||
continue;
|
||||
}
|
||||
if (!::IsDialogMessage(hKeyDlg, &msg)) {
|
||||
if (!::IsDialogMessage(hKeyDlg, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (!::IsWindow(hKeyDlg)) { fDone = true; }
|
||||
if (!::IsWindow(hKeyDlg))
|
||||
{
|
||||
fDone = true;
|
||||
}
|
||||
}
|
||||
::SetFocus(GetParent());
|
||||
::EnableWindow(GetParent(), true);
|
||||
|
|
|
@ -54,7 +54,10 @@ void CGeneralOptionsPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool CGeneralOptionsPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<CGeneralOptionsPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<CGeneralOptionsPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,10 @@ void COptionPluginPage::ApplySettings(bool UpdateScreen)
|
|||
|
||||
bool COptionPluginPage::EnableReset(void)
|
||||
{
|
||||
if (CSettingsPageImpl<COptionPluginPage>::EnableReset()) { return true; }
|
||||
if (CSettingsPageImpl<COptionPluginPage>::EnableReset())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SettingsConfig.h"
|
||||
#include "Settings/SettingsPage.h"
|
||||
#include "SettingsConfig.h"
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
|
||||
CSettingConfig::CSettingConfig(bool bJustGameSetting /* = false */) :
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SupportEnterCode.h"
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
#include "resource.h"
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
|
||||
class CRequestCode :
|
||||
public CDialogImpl<CRequestCode>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "SupportEnterCode.h"
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
enum {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "EditNumber32.h"
|
||||
|
||||
CEditNumber32::CEditNumber32(void) :
|
||||
|
@ -192,7 +193,8 @@ LRESULT CEditNumber32::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
|||
// Does not allow to delete '0' before x
|
||||
bHandled = true;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
bHandled = false;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -214,7 +216,8 @@ LRESULT CEditNumber32::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
|
|||
SendMessage(uMsg, L'x', lParam);
|
||||
bHandled = true;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
bHandled = false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "GetCWindowText.h"
|
||||
#include <Common/StdString.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "HexEditCtrl.h"
|
||||
#include <unordered_map>
|
||||
|
||||
|
@ -1208,7 +1209,6 @@ void CHexEditCtrl::OnKeyDown(UINT nChar, UINT /*nRepCnt*/, UINT /*nFlags*/)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (nChar == VK_DOWN)
|
||||
{
|
||||
m_CaretAddress = SatAdd32(m_CaretAddress, m_NumBytesPerRow);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#pragma once
|
||||
#include <stdafx.h>
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
typedef struct {
|
||||
WORD ctrlId;
|
||||
char* text;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "wtl-BitmapPicture.h"
|
||||
|
||||
CBitmapPicture::CBitmapPicture() :
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "WelcomeScreen.h"
|
||||
#include "resource.h"
|
||||
|
||||
|
@ -105,7 +106,8 @@ LRESULT WelcomeScreen::OnOkCmd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCt
|
|||
}
|
||||
|
||||
string Project64VideoPluginPath = g_Settings->LoadStringVal(Plugin_GFX_Default);
|
||||
if (Project64VideoPluginPath.find("Project64-Video") == string::npos) {
|
||||
if (Project64VideoPluginPath.find("Project64-Video") == string::npos)
|
||||
{
|
||||
Project64VideoPluginPath = "GFX\\Project64-Video.dll";
|
||||
}
|
||||
g_Settings->SaveString(Plugin_GFX_Default, CButton(GetDlgItem(IDC_RADIO_GLIDEN64)).GetCheck() == BST_CHECKED ? "GFX\\GLideN64\\GLideN64.dll" : Project64VideoPluginPath);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/AppInit.h>
|
||||
#include "UserInterface/WelcomeScreen.h"
|
||||
|
||||
#include "Settings/UISettings.h"
|
||||
#include "UserInterface/WelcomeScreen.h"
|
||||
#include <Project64-core/AppInit.h>
|
||||
|
||||
int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszArgs*/, int /*nWinMode*/)
|
||||
{
|
||||
|
@ -34,13 +35,12 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
|
|||
{
|
||||
// Handle combo loading (N64 ROM and 64DD Disk)
|
||||
|
||||
MainWindow.Show(true); // Show the main window
|
||||
MainWindow.Show(true);
|
||||
|
||||
stdstr extcombo = CPath(g_Settings->LoadStringVal(Cmd_ComboDiskFile)).GetExtension();
|
||||
stdstr ext = CPath(g_Settings->LoadStringVal(Cmd_RomFile)).GetExtension();
|
||||
|
||||
if (g_Settings->LoadStringVal(Cmd_ComboDiskFile).length() > 0
|
||||
&& ((_stricmp(extcombo.c_str(), "ndd") == 0) || (_stricmp(extcombo.c_str(), "d64") == 0)))
|
||||
if (g_Settings->LoadStringVal(Cmd_ComboDiskFile).length() > 0 && ((_stricmp(extcombo.c_str(), "ndd") == 0) || (_stricmp(extcombo.c_str(), "d64") == 0)))
|
||||
{
|
||||
if ((!(_stricmp(ext.c_str(), "ndd") == 0)) && (!(_stricmp(ext.c_str(), "d64") == 0)))
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
|
|||
{
|
||||
// Handle single game (N64 ROM or 64DD Disk)
|
||||
|
||||
MainWindow.Show(true); // Show the main window
|
||||
MainWindow.Show(true);
|
||||
|
||||
stdstr ext = CPath(g_Settings->LoadStringVal(Cmd_RomFile)).GetExtension();
|
||||
if ((!(_stricmp(ext.c_str(), "ndd") == 0)) && (!(_stricmp(ext.c_str(), "d64") == 0)))
|
||||
|
|
Loading…
Reference in New Issue