mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 18:32:47 +00:00
Some warnings fixed
This commit is contained in:
parent
94b0d9dfd5
commit
6d1c9f2764
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "Log.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/dir.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/filename.h>
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/msgdlg.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
#include "rMsgBox.h"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/image.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "rTime.h"
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/datetime.h>
|
||||
|
||||
std::string rDefaultDateTimeFormat = "%c";
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "key_vault.h"
|
||||
#include "unpkg.h"
|
||||
#include "restore_new.h"
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/progdlg.h>
|
||||
#include "define_new_memleakdetect.h"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "utils.h"
|
||||
#include "Emu/FS/vfsLocalFile.h"
|
||||
#include "unself.h"
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/zstream.h>
|
||||
|
||||
|
@ -15,7 +15,7 @@ void XAudio2Thread::Init()
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
#if (_WIN32_WINNT < 0x0602)
|
||||
#if (FORCED_WINVER < 0x0602)
|
||||
hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
@ -53,7 +53,7 @@ void XAudio2Thread::Quit()
|
||||
m_xaudio2_instance->Release();
|
||||
m_xaudio2_instance = nullptr;
|
||||
|
||||
#if (_WIN32_WINNT < 0x0602)
|
||||
#if (FORCED_WINVER < 0x0602)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
@ -4,10 +4,9 @@
|
||||
#if defined (_WIN32)
|
||||
|
||||
// forced define Win7, delete this for using XAudio2 2.8
|
||||
#define WINVER 0x0601
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#define FORCED_WINVER 0x0601
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#if (FORCED_WINVER >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include <xaudio2.h>
|
||||
#pragma comment(lib,"xaudio2.lib")
|
||||
#else
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "CPUInstrTable.h"
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
class CPUDecoder
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ vfsDevice* VFS::GetDevice(const std::string& ps3_path, std::string& path) const
|
||||
|
||||
path = m_devices[max_i]->GetLocalPath();
|
||||
|
||||
for (u32 i = max_eq; i < ps3_path_blocks.size(); i++)
|
||||
for (size_t i = max_eq; i < ps3_path_blocks.size(); i++)
|
||||
{
|
||||
path += "/" + ps3_path_blocks[i];
|
||||
}
|
||||
@ -382,7 +382,7 @@ vfsDevice* VFS::GetDeviceLocal(const std::string& local_path, std::string& path)
|
||||
|
||||
path = m_devices[max_i]->GetPs3Path();
|
||||
|
||||
for (u32 i = max_eq; i < local_path_blocks.size(); i++)
|
||||
for (size_t i = max_eq; i < local_path_blocks.size(); i++)
|
||||
{
|
||||
path += "/" + local_path_blocks[i];
|
||||
}
|
||||
|
@ -6,15 +6,15 @@ vfsStreamMemory::vfsStreamMemory() : vfsStream()
|
||||
{
|
||||
}
|
||||
|
||||
vfsStreamMemory::vfsStreamMemory(u64 addr, u64 size) : vfsStream()
|
||||
vfsStreamMemory::vfsStreamMemory(u32 addr, u32 size) : vfsStream()
|
||||
{
|
||||
Open(addr, size);
|
||||
}
|
||||
|
||||
void vfsStreamMemory::Open(u64 addr, u64 size)
|
||||
void vfsStreamMemory::Open(u32 addr, u32 size)
|
||||
{
|
||||
m_addr = addr;
|
||||
m_size = size ? size : ~0ULL;
|
||||
m_size = size ? size : 0x100000000ull - addr; // determine max possible size
|
||||
|
||||
vfsStream::Reset();
|
||||
}
|
||||
@ -26,24 +26,24 @@ u64 vfsStreamMemory::GetSize()
|
||||
|
||||
u64 vfsStreamMemory::Write(const void* src, u64 size)
|
||||
{
|
||||
if(Tell() + size > GetSize())
|
||||
assert(Tell() < m_size);
|
||||
if (Tell() + size > m_size)
|
||||
{
|
||||
size = GetSize() - Tell();
|
||||
size = m_size - Tell();
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr<void>(m_addr + Tell()), src, size);
|
||||
|
||||
memcpy(vm::get_ptr<void>(vm::cast(m_addr + Tell())), src, size);
|
||||
return vfsStream::Write(src, size);
|
||||
}
|
||||
|
||||
u64 vfsStreamMemory::Read(void* dst, u64 size)
|
||||
{
|
||||
if(Tell() + size > GetSize())
|
||||
assert(Tell() < GetSize());
|
||||
if (Tell() + size > GetSize())
|
||||
{
|
||||
size = GetSize() - Tell();
|
||||
}
|
||||
|
||||
memcpy(dst, vm::get_ptr<void>(m_addr + Tell()), size);
|
||||
|
||||
memcpy(dst, vm::get_ptr<void>(vm::cast(m_addr + Tell())), size);
|
||||
return vfsStream::Read(dst, size);
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
|
||||
struct vfsStreamMemory : public vfsStream
|
||||
{
|
||||
u64 m_addr;
|
||||
u32 m_addr;
|
||||
u64 m_size;
|
||||
|
||||
public:
|
||||
vfsStreamMemory();
|
||||
vfsStreamMemory(u64 addr, u64 size = 0);
|
||||
vfsStreamMemory(u32 addr, u32 size = 0);
|
||||
|
||||
void Open(u64 addr, u64 size = 0);
|
||||
void Open(u32 addr, u32 size = 0);
|
||||
|
||||
virtual u64 GetSize() override;
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
#endif
|
||||
|
||||
// This header should be frontend-agnostic, so don't assume wx includes everything
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
|
Loading…
x
Reference in New Issue
Block a user