Commit cb3bd71c authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent 07043f8d
Pipeline #19892 failed with stages
in 2 minutes and 25 seconds
......@@ -1056,7 +1056,7 @@ ifeq ($(NEED_CXX11), 1)
endif
ifeq ($(HAVE_CHD),1)
CORE_DEFINES += -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST -DUSE_FLAC -DUSE_LZMA
CORE_DEFINES += -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST -DUSE_FLAC -DUSE_LZMA
endif
RZDCY_CFLAGS += $(CORE_DEFINES)
......
......@@ -56,7 +56,7 @@ public:
SzArchiveFile(u8 *data, u32 offset, u32 length) : data(data), offset(offset), length(length) {}
virtual u32 Read(void *buffer, u32 length) override
{
length = min(length, this->length);
length = std::min(length, this->length);
memcpy(buffer, data + offset, length);
return length;
}
......
......@@ -19,16 +19,16 @@
struct CORE_FILE {
FILE* f;
string path;
std::string path;
size_t seek_ptr;
string host;
std::string host;
int port;
};
core_file* core_fopen(const char* filename)
{
string p = filename;
std::string p = filename;
CORE_FILE* rv = new CORE_FILE();
rv->f = 0;
......
......@@ -51,7 +51,7 @@ struct MemChip
die("Method not supported");
}
bool Load(const string& file)
bool Load(const std::string& file)
{
FILE* f=fopen(file.c_str(),"rb");
if (f)
......@@ -71,7 +71,7 @@ struct MemChip
return Load(this->load_filename);
}
void Save(const string& file)
void Save(const std::string& file)
{
FILE* f=fopen(file.c_str(),"wb");
if (f)
......@@ -81,7 +81,7 @@ struct MemChip
}
}
bool Load(const string& root,const char *prefix,const char *names_ro,const char *title)
bool Load(const std::string& root,const char *prefix,const char *names_ro,const char *title)
{
char base[512];
char temp[512];
......@@ -116,7 +116,7 @@ struct MemChip
return false;
}
void Save(const string& root,const string& prefix,const string& name_ro,const string& title)
void Save(const std::string& root,const std::string& prefix,const std::string& name_ro,const std::string& title)
{
char path[512];
......
......@@ -1046,7 +1046,7 @@ static int getGDROMTicks()
if (len - SB_GDLEND > 10240)
return 1000000; // Large transfers: GD-ROM transfer rate 1.8 MB/s
else
return min((u32)10240, len - SB_GDLEND) * 2; // Small transfers: Max G1 bus rate: 50 MHz x 16 bits
return std::min((u32)10240, len - SB_GDLEND) * 2; // Small transfers: Max G1 bus rate: 50 MHz x 16 bits
}
else
return 0;
......@@ -1080,9 +1080,9 @@ static int GDRomschd(int i, int c, int j)
//if we don't have any more sectors to read
//make sure we don't underrun the cache :)
if (read_params.remaining_sectors == 0)
len = min(len, read_buff.cache_size);
len = std::min(len, read_buff.cache_size);
len = min(len, (u32)10240);
len = std::min(len, (u32)10240);
#if 0
// do we need to do this for GDROM DMA?
......
......@@ -192,8 +192,8 @@ void FixUpFlash()
}
}
static bool nvmem_load(const string& root,
const string& s1, const char *s2)
static bool nvmem_load(const std::string& root,
const std::string& s1, const char *s2)
{
switch (settings.System)
{
......@@ -211,7 +211,7 @@ static bool nvmem_load(const string& root,
return false;
}
bool LoadRomFiles(const string& root)
bool LoadRomFiles(const std::string& root)
{
if (settings.System != DC_PLATFORM_ATOMISWAVE)
{
......@@ -232,7 +232,7 @@ bool LoadRomFiles(const string& root)
return true;
}
void SaveRomFiles(const string& root)
void SaveRomFiles(const std::string& root)
{
switch (settings.System)
{
......@@ -267,7 +267,7 @@ u8 *get_nvmem_data(void)
return NULL;
}
bool LoadHle(const string& root) {
bool LoadHle(const std::string& root) {
if (!nvmem_load(root, "%nvmem.bin;%flash_wb.bin;%flash.bin;%flash.bin.bin", "nvram")) {
WARN_LOG(FLASHROM, "No nvmem loaded\n");
}
......
......@@ -569,7 +569,7 @@ struct maple_sega_vmu: maple_base
{
memset(flash_data,0,sizeof(flash_data));
memset(lcd_data,0,sizeof(lcd_data));
string apath = get_writable_vmu_path(logical_port);
std::string apath = get_writable_vmu_path(logical_port);
vmu_screen_params[bus_id].vmu_lcd_screen = lcd_data_decoded ;
......
......@@ -270,7 +270,7 @@ static u32 vmem32_map_mmu(u32 address, bool write)
}
verify(vmem32_map_buffer(vpn, page_size, offset, page_size, allow_write) != NULL);
u32 end = start + page_size;
const vector<vram_lock>& blocks = vram_blocks[start / VRAM_PROT_SEGMENT];
const std::vector<vram_lock>& blocks = vram_blocks[start / VRAM_PROT_SEGMENT];
{
std::lock_guard<cMutex> lock(vramlist_lock);
......
......@@ -57,10 +57,10 @@ struct pico_ip4 public_ip;
struct pico_ip4 afo_ip;
// src socket -> socket fd
static map<struct pico_socket *, sock_t> tcp_sockets;
static map<struct pico_socket *, sock_t> tcp_connecting_sockets;
static std::map<struct pico_socket *, sock_t> tcp_sockets;
static std::map<struct pico_socket *, sock_t> tcp_connecting_sockets;
// src port -> socket fd
static map<uint16_t, sock_t> udp_sockets;
static std::map<uint16_t, sock_t> udp_sockets;
static const uint16_t games_udp_ports[] = {
7980, // Alien Front Online
......@@ -94,7 +94,7 @@ static const uint16_t games_tcp_ports[] = {
17219, // Worms World Party
};
// listening port -> socket fd
static map<uint16_t, sock_t> tcp_listening_sockets;
static std::map<uint16_t, sock_t> tcp_listening_sockets;
static void read_native_sockets();
void get_host_by_name(const char *name, struct pico_ip4 dnsaddr);
......@@ -413,7 +413,7 @@ static void read_native_sockets()
for (auto it = tcp_connecting_sockets.begin(); it != tcp_connecting_sockets.end(); it++)
{
FD_SET(it->second, &write_fds);
max_fd = max(max_fd, (int)it->second);
max_fd = std::max(max_fd, (int)it->second);
}
struct timeval tv;
tv.tv_sec = 0;
......
......@@ -604,7 +604,7 @@ void *GDCartridge::GetDmaPtr(u32 &size)
}
dimm_cur_address = DmaOffset & (dimm_data_size-1);
size = min(size, dimm_data_size - dimm_cur_address);
size = std::min(size, dimm_data_size - dimm_cur_address);
return dimm_data + dimm_cur_address;
}
......@@ -623,7 +623,7 @@ bool GDCartridge::Read(u32 offset, u32 size, void *dst)
return true;
}
u32 addr = offset & (dimm_data_size-1);
memcpy(dst, &dimm_data[addr], min(size, dimm_data_size - addr));
memcpy(dst, &dimm_data[addr], std::min(size, dimm_data_size - addr));
return true;
}
......
......@@ -26,7 +26,7 @@ public:
{
if (encryption)
{
size = min(size, (u32)sizeof(buffer));
size = std::min(size, (u32)sizeof(buffer));
return buffer;
}
else
......
......@@ -455,9 +455,9 @@ static bool naomi_cart_LoadRom(const char* file)
folder_pos++;
vector<string> files;
vector<u32> fstart;
vector<u32> fsize;
std::vector<std::string> files;
std::vector<u32> fstart;
std::vector<u32> fsize;
u32 setsize = 0;
bool raw_bin_file = false;
......@@ -536,7 +536,7 @@ static bool naomi_cart_LoadRom(const char* file)
fstart.push_back(addr);
fsize.push_back(sz);
setsize += sz;
RomSize = max(RomSize, (addr + sz));
RomSize = std::max(RomSize, (addr + sz));
}
else if (line[0] != 0 && line[0] != '\n' && line[0] != '\r')
WARN_LOG(NAOMI, "Warning: invalid line in .lst file: %s", line);
......@@ -765,7 +765,7 @@ void* NaomiCartridge::GetDmaPtr(u32& size)
size = 0;
return NULL;
}
size = min(size, RomSize - (DmaOffset & 0x1fffffff));
size = std::min(size, RomSize - (DmaOffset & 0x1fffffff));
return GetPtr(DmaOffset, size);
}
......@@ -1075,7 +1075,7 @@ void* M2Cartridge::GetDmaPtr(u32& size)
// 4MB mode
u32 offset4mb = (DmaOffset & 0x103fffff) | ((DmaOffset & 0x07c00000) << 1);
size = min(min(size, 0x400000 - (offset4mb & 0x3FFFFF)), RomSize - offset4mb);
size = std::min(std::min(size, 0x400000 - (offset4mb & 0x3FFFFF)), RomSize - offset4mb);
return GetPtr(offset4mb, size);
}
......
......@@ -264,14 +264,14 @@ void rend_start_render(void)
ctx->rend.fog_clamp_min = FOG_CLAMP_MIN;
ctx->rend.fog_clamp_max = FOG_CLAMP_MAX;
max_idx = max(max_idx, ctx->rend.idx.used());
max_vtx = max(max_vtx, ctx->rend.verts.used());
max_op = max(max_op, ctx->rend.global_param_op.used());
max_pt = max(max_pt, ctx->rend.global_param_pt.used());
max_tr = max(max_tr, ctx->rend.global_param_tr.used());
max_mvo = max(max_mvo, ctx->rend.global_param_mvo.used());
max_modt = max(max_modt, ctx->rend.modtrig.used());
max_idx = std::max(max_idx, ctx->rend.idx.used());
max_vtx = std::max(max_vtx, ctx->rend.verts.used());
max_op = std::max(max_op, ctx->rend.global_param_op.used());
max_pt = std::max(max_pt, ctx->rend.global_param_pt.used());
max_tr = std::max(max_tr, ctx->rend.global_param_tr.used());
max_mvo = std::max(max_mvo, ctx->rend.global_param_mvo.used());
max_modt = std::max(max_modt, ctx->rend.modtrig.used());
if (QueueRender(ctx))
{
......
......@@ -147,24 +147,24 @@ int spg_line_sched(int tag, int cycl, int jit)
u32 min_active = pvr_numscanlines;
if (min_scanline < SPG_VBLANK_INT.vblank_in_interrupt_line_number)
min_active = min(min_active, SPG_VBLANK_INT.vblank_in_interrupt_line_number);
min_active = std::min(min_active, SPG_VBLANK_INT.vblank_in_interrupt_line_number);
if (min_scanline < SPG_VBLANK_INT.vblank_out_interrupt_line_number)
min_active = min(min_active, SPG_VBLANK_INT.vblank_out_interrupt_line_number);
min_active = std::min(min_active, SPG_VBLANK_INT.vblank_out_interrupt_line_number);
if (min_scanline < SPG_VBLANK.vstart)
min_active = min(min_active, SPG_VBLANK.vstart);
min_active = std::min(min_active, SPG_VBLANK.vstart);
if (min_scanline < SPG_VBLANK.vbend)
min_active = min(min_active, SPG_VBLANK.vbend);
min_active = std::min(min_active, SPG_VBLANK.vbend);
if (min_scanline < pvr_numscanlines)
min_active = min(min_active, pvr_numscanlines);
min_active = std::min(min_active, pvr_numscanlines);
if (lightgun_line != 0xffff && min_scanline < lightgun_line)
min_active = min(min_active, lightgun_line);
min_active = std::min(min_active, lightgun_line);
min_active = max(min_active,min_scanline);
min_active = std::max(min_active,min_scanline);
return (min_active - pvr_cur_scanline)*Line_Cycles;
}
......
......@@ -203,8 +203,8 @@ void FinishRender(TA_context* ctx)
static cMutex mtx_pool;
/* texture cache entry pool. */
static vector<TA_context*> ctx_pool;
static vector<TA_context*> ctx_list;
static std::vector<TA_context*> ctx_pool;
static std::vector<TA_context*> ctx_list;
TA_context* tactx_Alloc(void)
{
......
......@@ -385,7 +385,7 @@ void bm_Term()
bm_Reset();
}
void bm_WriteBlockMap(const string& file)
void bm_WriteBlockMap(const std::string& file)
{
FILE* f=fopen(file.c_str(),"wb");
if (f)
......@@ -607,8 +607,8 @@ void bm_RamWriteAccess(u32 addr)
}
unprotected_pages[addr / PAGE_SIZE] = true;
bm_UnlockPage(addr);
set<RuntimeBlockInfo*>& block_list = blocks_per_page[addr / PAGE_SIZE];
vector<RuntimeBlockInfo*> list_copy;
std::set<RuntimeBlockInfo*>& block_list = blocks_per_page[addr / PAGE_SIZE];
std::vector<RuntimeBlockInfo*> list_copy;
list_copy.insert(list_copy.begin(), block_list.begin(), block_list.end());
if (!list_copy.empty())
DEBUG_LOG(DYNAREC, "bm_RamWriteAccess write access to %08x pc %08x", addr, next_pc);
......@@ -743,7 +743,7 @@ void print_blocks()
#endif
}
string s=op->dissasm();
std::string s=op->dissasm();
fprintf(f,"//il:%d:%d:%s\n",op->guest_offs,op->host_offs,s.c_str());
}
......
......@@ -62,7 +62,7 @@ struct RuntimeBlockInfo: RuntimeBlockInfo_Core
BlockEndType BlockType;
bool has_jcond;
vector<shil_opcode> oplist;
std::vector<shil_opcode> oplist;
bool contains_code(const u8* ptr)
{
......@@ -75,7 +75,7 @@ struct RuntimeBlockInfo: RuntimeBlockInfo_Core
virtual void Relocate(void* dst)=0;
//predecessors references
vector<RuntimeBlockInfoPtr> pre_refs;
std::vector<RuntimeBlockInfoPtr> pre_refs;
void AddRef(const RuntimeBlockInfoPtr& other);
void RemRef(const RuntimeBlockInfoPtr& other);
......@@ -90,7 +90,7 @@ struct RuntimeBlockInfo: RuntimeBlockInfo_Core
bool read_only;
};
void bm_WriteBlockMap(const string& file);
void bm_WriteBlockMap(const std::string& file);
extern "C" {
__attribute__((used)) DynarecCodeEntryPtr DYNACALL bm_GetCodeByVAddr(u32 addr);
......
......@@ -1132,9 +1132,9 @@ _end:
blk->guest_cycles *= 1.5f;
//make sure we don't use wayy-too-many cycles
blk->guest_cycles=min(blk->guest_cycles,max_cycles);
blk->guest_cycles = std::min(blk->guest_cycles,max_cycles);
//make sure we don't use wayy-too-few cycles
blk->guest_cycles=max(1U,blk->guest_cycles);
blk->guest_cycles = std::max(1U,blk->guest_cycles);
blk=0;
return true;
......
......@@ -48,7 +48,7 @@ struct RegAlloc
bool aliased;
vector<RegAccess> accesses;
std::vector<RegAccess> accesses;
RegSpan(const shil_param& prm,int pos, AccessMode mode)
{
......@@ -196,7 +196,7 @@ struct RegAlloc
};
vector<RegSpan*> all_spans;
std::vector<RegSpan*> all_spans;
u32 spills;
u32 current_opid;
......@@ -385,7 +385,7 @@ struct RegAlloc
return is_fpr && (op->rd.count()>=2 || op->rd2.count()>=2 || op->rs1.count()>=2 || op->rs2.count()>=2 || op->rs3.count()>=2 );
}
void InsertRegs(set<shil_param>& l, const shil_param& regs)
void InsertRegs(std::set<shil_param>& l, const shil_param& regs)
{
if (!explode_spans || (regs.count()==1 || regs.count()>2))
{
......@@ -546,8 +546,8 @@ struct RegAlloc
}
}
}
set<shil_param> reg_wt;
set<shil_param> reg_rd;
std::set<shil_param> reg_wt;
std::set<shil_param> reg_rd;
//insert regs into sets ..
InsertRegs(reg_wt,op->rd);
......@@ -560,7 +560,7 @@ struct RegAlloc
InsertRegs(reg_rd,op->rs3);
set<shil_param>::iterator iter=reg_wt.begin();
std::set<shil_param>::iterator iter=reg_wt.begin();
while( iter != reg_wt.end() )
{
if (reg_rd.count(*iter))
......@@ -687,8 +687,8 @@ struct RegAlloc
}
// create register lists
deque<nreg_t> regs;
deque<nregf_t> regsf;
std::deque<nreg_t> regs;
std::deque<nregf_t> regsf;
const nreg_t* nregs=nregs_avail;
......
......@@ -28,9 +28,9 @@ void AnalyseBlock(RuntimeBlockInfo* blk)
optim.Optimize();
}
string name_reg(Sh4RegType reg)
std::string name_reg(Sh4RegType reg)
{
stringstream ss;
std::stringstream ss;
if (reg>=reg_fr_0 && reg<=reg_xf_15)
ss << "f" << (reg - reg_fr_0);
......@@ -90,9 +90,9 @@ string name_reg(Sh4RegType reg)
return ss.str();
}
static string dissasm_param(const shil_param& prm, bool comma)
static std::string dissasm_param(const shil_param& prm, bool comma)
{
stringstream ss;
std::stringstream ss;
if (!prm.is_null() && comma)
ss << ", ";
......@@ -102,7 +102,7 @@ static string dissasm_param(const shil_param& prm, bool comma)
if (prm.is_imm_s8())
ss << (s32)prm._imm ;
else
ss << "0x" << hex << prm._imm;
ss << "0x" << std::hex << prm._imm;
}
else if (prm.is_reg())
{
......@@ -118,9 +118,9 @@ static string dissasm_param(const shil_param& prm, bool comma)
return ss.str();
}
string shil_opcode::dissasm() const
std::string shil_opcode::dissasm() const
{
stringstream ss;
std::stringstream ss;
ss << shilop_str[op] << " " << dissasm_param(rd,false) << dissasm_param(rd2,true) << " <- " << dissasm_param(rs1,false) << dissasm_param(rs2,true) << dissasm_param(rs3,true);
return ss.str();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment