Remove std prefix from uint types

std::uint*  ->  uint*
This commit is contained in:
sukibaby
2024-10-05 19:25:41 -07:00
committed by teejusb
parent 57afab25c1
commit 659cd549a2
112 changed files with 589 additions and 589 deletions
+2 -2
View File
@@ -33,9 +33,9 @@ std::int64_t ArchHooks::FixupTimeIfLooped( std::int64_t usecs )
static std::int64_t offset_us = 0;
/* The time has wrapped if the last time was very high and the current time is very low. */
const std::int64_t i32BitMaxMs = std::uint64_t(1) << 32;
const std::int64_t i32BitMaxMs = uint64_t(1) << 32;
const std::int64_t i32BitMaxUs = i32BitMaxMs*1000;
const std::int64_t one_day = std::uint64_t(24*60*60)*1000000;
const std::int64_t one_day = uint64_t(24*60*60)*1000000;
if( last > (i32BitMaxUs-one_day) && usecs < one_day )
offset_us += i32BitMaxUs;
+2 -2
View File
@@ -161,7 +161,7 @@ void ArchHooks_MacOSX::DumpDebugInfo()
float fRam;
char ramPower;
{
std::uint64_t iRam = 0;
uint64_t iRam = 0;
GET_PARAM( "hw.memsize", iRam );
fRam = float( double(iRam) / 1073741824.0 );
@@ -176,7 +176,7 @@ void ArchHooks_MacOSX::DumpDebugInfo()
RString sModel("Unknown");
do {
char szModel[128];
std::uint64_t iFreq;
uint64_t iFreq;
GET_PARAM( "hw.logicalcpu_max", iMaxCPUs );
GET_PARAM( "hw.logicalcpu", iCPUs );
+1 -1
View File
@@ -22,7 +22,7 @@ static HANDLE g_hInstanceMutex;
static bool g_bIsMultipleInstance = false;
void InvalidParameterHandler( const wchar_t *szExpression, const wchar_t *szFunction, const wchar_t *szFile,
unsigned int iLine, std::uintptr_t pReserved )
unsigned int iLine, uintptr_t pReserved )
{
FAIL_M( "Invalid parameter" ); //TODO: Make this more informative
}
@@ -72,7 +72,7 @@ struct EventDevice
static std::vector<EventDevice *> g_apEventDevices;
static bool BitIsSet( const std::uint8_t *pArray, std::uint32_t iBit )
static bool BitIsSet( const uint8_t *pArray, uint32_t iBit )
{
return !!(pArray[iBit/8] & (1<<(iBit%8)));
}
@@ -128,7 +128,7 @@ bool EventDevice::Open( RString sFile, InputDevice dev )
DevInfo.version, m_sName.c_str() );
}
std::uint8_t iABSMask[ABS_MAX/8 + 1];
uint8_t iABSMask[ABS_MAX/8 + 1];
memset( iABSMask, 0, sizeof(iABSMask) );
if( ioctl(m_iFD, EVIOCGBIT(EV_ABS, sizeof(iABSMask)), iABSMask) < 0 )
LOG->Warn( "ioctl(EVIOCGBIT(EV_ABS)): %s", strerror(errno) );
@@ -145,12 +145,12 @@ bool EventDevice::Open( RString sFile, InputDevice dev )
}
}
std::uint8_t iKeyMask[KEY_MAX/8 + 1];
uint8_t iKeyMask[KEY_MAX/8 + 1];
memset( iKeyMask, 0, sizeof(iKeyMask) );
if( ioctl(m_iFD, EVIOCGBIT(EV_KEY, sizeof(iKeyMask)), iKeyMask) < 0 )
LOG->Warn( "ioctl(EVIOCGBIT(EV_KEY)): %s", strerror(errno) );
std::uint8_t iEventTypes[EV_MAX/8];
uint8_t iEventTypes[EV_MAX/8];
memset( iEventTypes, 0, sizeof(iEventTypes) );
if( ioctl(m_iFD, EVIOCGBIT(0, EV_MAX), iEventTypes) == -1 )
LOG->Warn( "ioctl(EV_MAX): %s", strerror(errno) );
@@ -132,7 +132,7 @@ class InputHandler_SextetStream::Impl
handler->ButtonPressed(di);
}
std::uint8_t stateBuffer[STATE_BUFFER_SIZE];
uint8_t stateBuffer[STATE_BUFFER_SIZE];
size_t timeout_ms;
RageThread inputThread;
bool continueInputThread;
@@ -192,7 +192,7 @@ class InputHandler_SextetStream::Impl
return 0;
}
inline void GetNewState(std::uint8_t * buffer, RString& line)
inline void GetNewState(uint8_t * buffer, RString& line)
{
size_t lineLen = line.length();
size_t i, cursor;
@@ -228,10 +228,10 @@ class InputHandler_SextetStream::Impl
}
}
inline void ReactToChanges(const std::uint8_t * newStateBuffer)
inline void ReactToChanges(const uint8_t * newStateBuffer)
{
InputDevice id = InputDevice(FIRST_DEVICE);
std::uint8_t changes[STATE_BUFFER_SIZE];
uint8_t changes[STATE_BUFFER_SIZE];
RageTimer now;
// XOR to find differences
@@ -276,7 +276,7 @@ class InputHandler_SextetStream::Impl
if(linereader->ReadLine(line)) {
LOG->Trace("Got line: '%s'", line.c_str());
if(line.length() > 0) {
std::uint8_t newStateBuffer[STATE_BUFFER_SIZE];
uint8_t newStateBuffer[STATE_BUFFER_SIZE];
GetNewState(newStateBuffer, line);
ReactToChanges(newStateBuffer);
}
@@ -13,7 +13,7 @@
#include <process.h>
typedef int (*thread_create_t)(
int (*proc)(void*), void* ctx, std::uint32_t stack_sz, unsigned int priority);
int (*proc)(void*), void* ctx, uint32_t stack_sz, unsigned int priority);
typedef void (*thread_join_t)(int thread_id, int* result);
typedef void (*thread_destroy_t)(int thread_id);
@@ -28,13 +28,13 @@ static DDRIO_IO_INIT ddrio_io_init;
typedef int (*DDRIO_READ_PAD)();
static DDRIO_READ_PAD ddrio_io_read_pad;
typedef int (*DDRIO_SETLIGHTS_P3IO)(std::uint32_t lights);
typedef int (*DDRIO_SETLIGHTS_P3IO)(uint32_t lights);
static DDRIO_SETLIGHTS_P3IO ddrio_set_lights_p3io;
typedef int (*DDRIO_SETLIGHTS_EXTIO)(std::uint32_t lights);
typedef int (*DDRIO_SETLIGHTS_EXTIO)(uint32_t lights);
static DDRIO_SETLIGHTS_EXTIO ddrio_set_lights_extio;
typedef int (*DDRIO_SETLIGHTS_HDXSPANEL)(std::uint32_t lights);
typedef int (*DDRIO_SETLIGHTS_HDXSPANEL)(uint32_t lights);
static DDRIO_SETLIGHTS_HDXSPANEL ddrio_set_lights_hdxs_panel;
typedef int (*DDRIO_FINI)();
@@ -69,13 +69,13 @@ static unsigned int crt_thread_shim(void* outer_ctx)
int crt_thread_create(
int (*proc)(void*), void* ctx, std::uint32_t stack_sz, unsigned int priority)
int (*proc)(void*), void* ctx, uint32_t stack_sz, unsigned int priority)
{
LOG->Trace("crt_thread_create");
struct shim_ctx sctx;
std::uintptr_t thread_id;
uintptr_t thread_id;
sctx.barrier = CreateEvent(NULL, TRUE, FALSE, NULL);
sctx.proc = proc;
@@ -96,7 +96,7 @@ void crt_thread_destroy(int thread_id)
{
LOG->Trace("crt_thread_destroy %d", thread_id);
CloseHandle((HANDLE)(std::uintptr_t)thread_id);
CloseHandle((HANDLE)(uintptr_t)thread_id);
}
@@ -104,11 +104,11 @@ void crt_thread_join(int thread_id, int* result)
{
LOG->Trace("crt_thread_join %d", thread_id);
WaitForSingleObject((HANDLE)(std::uintptr_t)thread_id, INFINITE);
WaitForSingleObject((HANDLE)(uintptr_t)thread_id, INFINITE);
if (result)
{
GetExitCodeThread((HANDLE)(std::uintptr_t)thread_id, (DWORD*)result);
GetExitCodeThread((HANDLE)(uintptr_t)thread_id, (DWORD*)result);
}
}
@@ -265,7 +265,7 @@ int InputHandler_Win32_ddrio::InputThread_Start( void *p )
void InputHandler_Win32_ddrio::InputThreadMain()
{
std::uint32_t prevInput = 0, newInput = 0;
uint32_t prevInput = 0, newInput = 0;
LightsState prevLS = { 0 };
LightsState newLS = { 0 };
@@ -294,7 +294,7 @@ void InputHandler_Win32_ddrio::InputThreadMain()
}
}
void InputHandler_Win32_ddrio::PushInputState(std::uint32_t newInput)
void InputHandler_Win32_ddrio::PushInputState(uint32_t newInput)
{
for (int i = 0; i < 32; i++)
{
@@ -337,9 +337,9 @@ bool InputHandler_Win32_ddrio::IsLightChange(LightsState prevLS, LightsState new
void InputHandler_Win32_ddrio::PushLightState(LightsState newLS)
{
std::uint32_t p3io = 0;
std::uint32_t hdxs = 0;
std::uint32_t extio = 0;
uint32_t p3io = 0;
uint32_t hdxs = 0;
uint32_t extio = 0;
//lighting state has already been verified to have changed in this method, so create the new one from scratch.
@@ -81,7 +81,7 @@ private:
static int InputThread_Start( void *p );
void InputThreadMain();
void PushInputState(std::uint32_t newInput);
void PushInputState(uint32_t newInput);
bool IsLightChange(LightsState prevLS, LightsState newLS);
void PushLightState(LightsState newLS);
@@ -79,7 +79,7 @@ void LightsDriver_LinuxPacDrive::Set( const LightsState *ls )
{
if ( !DeviceHandle ) return;
std::uint16_t outb = 0;
uint16_t outb = 0;
switch (iLightingOrder) {
case 1:
@@ -245,13 +245,13 @@ void LightsDriver_LinuxPacDrive::OpenDevice()
}
}
void LightsDriver_LinuxPacDrive::WriteDevice(std::uint16_t out)
void LightsDriver_LinuxPacDrive::WriteDevice(uint16_t out)
{
if ( !DeviceHandle ) return;
// output is within the first 16 bits - accept a
// 16-bit arg and cast it, for simplicity's sake.
std::uint32_t data = (out << 16);
uint32_t data = (out << 16);
int expected = sizeof(data);
int result = usb_control_msg( DeviceHandle, USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+1 -1
View File
@@ -22,7 +22,7 @@ private:
void FindDevice();
void OpenDevice();
void WriteDevice(std::uint16_t out);
void WriteDevice(uint16_t out);
void CloseDevice();
struct usb_device *Device;
+2 -2
View File
@@ -10,8 +10,8 @@
class LightsDriver_Linux_Leds : public LightsDriver
{
private:
static const std::uint8_t LINUX_LED_STATE_ON = 255;
static const std::uint8_t LINUX_LED_STATE_OFF = 0;
static const uint8_t LINUX_LED_STATE_ON = 255;
static const uint8_t LINUX_LED_STATE_OFF = 0;
static const int LINUX_LED_MAX_DIRECTORY_LENGTH = PATH_MAX;
const InputScheme *pInput;
+3 -3
View File
@@ -25,7 +25,7 @@
REGISTER_LIGHTS_DRIVER_CLASS2(stac, Linux_stac);
StacDevice::StacDevice(std::uint8_t pn)
StacDevice::StacDevice(uint8_t pn)
{
memset(outputBuffer, 0x00, sizeof(outputBuffer));
@@ -177,11 +177,11 @@ void StacDevice::Close()
void StacDevice::SetInBuffer(int index, bool lightState)
{
//the first byte is the report ID, so we offset it here to adjust.
std::uint8_t index_offset = index + 1;
uint8_t index_offset = index + 1;
//each index in the array represents a single light,
//the light will turn on for any value that isn't 0x00
std::uint8_t val = lightState ? 0xFF : 0x00;
uint8_t val = lightState ? 0xFF : 0x00;
//ensure the index is valid and the light value has changed.
if (index_offset < STAC_HIDREPORT_SIZE && outputBuffer[index_offset] != val)
+3 -3
View File
@@ -52,12 +52,12 @@ public:
const char *devicePath;
int fd = -1;
std::uint8_t playerNumber = 0;
uint8_t playerNumber = 0;
bool newState = false;
std::uint8_t outputBuffer[STAC_HIDREPORT_SIZE];
uint8_t outputBuffer[STAC_HIDREPORT_SIZE];
StacDevice(std::uint8_t pn);
StacDevice(uint8_t pn);
void FindDevice();
void Connect();
@@ -19,7 +19,7 @@ namespace
class SextetImpl
{
protected:
std::uint8_t lastOutput[FULL_SEXTET_COUNT];
uint8_t lastOutput[FULL_SEXTET_COUNT];
RageFile * out;
public:
@@ -41,7 +41,7 @@ namespace
void Set(const LightsState * ls)
{
std::uint8_t buffer[FULL_SEXTET_COUNT];
uint8_t buffer[FULL_SEXTET_COUNT];
packLine(buffer, ls);
+1 -1
View File
@@ -71,7 +71,7 @@ LightsDriver_Win32Serial::~LightsDriver_Win32Serial()
void LightsDriver_Win32Serial::Set(const LightsState* ls)
{
if (serialPort != INVALID_HANDLE_VALUE) {
std::uint8_t buffer[FULL_SEXTET_COUNT];
uint8_t buffer[FULL_SEXTET_COUNT];
packLine(buffer, ls);
+1 -1
View File
@@ -16,7 +16,7 @@
class LightsDriver_Win32Serial : public LightsDriver
{
protected:
std::uint8_t lastOutput[FULL_SEXTET_COUNT];
uint8_t lastOutput[FULL_SEXTET_COUNT];
public:
LightsDriver_Win32Serial();
virtual ~LightsDriver_Win32Serial();
+8 -8
View File
@@ -23,7 +23,7 @@ static const size_t FULL_SEXTET_COUNT = CABINET_SEXTET_COUNT + (NUM_GameControll
// Encodes the low 6 bits of a byte as a printable, non-space ASCII
// character (i.e., within the range 0x21-0x7E) such that the low 6 bits of
// the character are the same as the input.
inline std::uint8_t printableSextet(std::uint8_t data)
inline uint8_t printableSextet(uint8_t data)
{
// Maps the 6-bit value into the range 0x30-0x6F, wrapped in such a way
// that the low 6 bits of the result are the same as the data (so
@@ -38,13 +38,13 @@ inline std::uint8_t printableSextet(std::uint8_t data)
// the top two bits T of the input like so:
// H = ((T + 1) mod 4) + 3
return ((data + (std::uint8_t)0x10) & (std::uint8_t)0x3F) + (std::uint8_t)0x30;
return ((data + (uint8_t)0x10) & (uint8_t)0x3F) + (uint8_t)0x30;
}
// Packs 6 booleans into a 6-bit value
inline std::uint8_t packPlainSextet(bool b0, bool b1, bool b2, bool b3, bool b4, bool b5)
inline uint8_t packPlainSextet(bool b0, bool b1, bool b2, bool b3, bool b4, bool b5)
{
return (std::uint8_t)(
return (uint8_t)(
(b0 ? 0x01 : 0) |
(b1 ? 0x02 : 0) |
(b2 ? 0x04 : 0) |
@@ -54,13 +54,13 @@ inline std::uint8_t packPlainSextet(bool b0, bool b1, bool b2, bool b3, bool b4,
}
// Packs 6 booleans into a printable sextet
inline std::uint8_t packPrintableSextet(bool b0, bool b1, bool b2, bool b3, bool b4, bool b5)
inline uint8_t packPrintableSextet(bool b0, bool b1, bool b2, bool b3, bool b4, bool b5)
{
return printableSextet(packPlainSextet(b0, b1, b2, b3, b4, b5));
}
// Packs the cabinet lights into a printable sextet and adds it to a buffer
inline size_t packCabinetLights(const LightsState* ls, std::uint8_t* buffer)
inline size_t packCabinetLights(const LightsState* ls, uint8_t* buffer)
{
buffer[0] = packPrintableSextet(
ls->m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT],
@@ -74,7 +74,7 @@ inline size_t packCabinetLights(const LightsState* ls, std::uint8_t* buffer)
// Packs the button lights for a controller into 6 printable sextets and
// adds them to a buffer
inline size_t packControllerLights(const LightsState* ls, GameController gc, std::uint8_t* buffer)
inline size_t packControllerLights(const LightsState* ls, GameController gc, uint8_t* buffer)
{
// Menu buttons
buffer[0] = packPrintableSextet(
@@ -127,7 +127,7 @@ inline size_t packControllerLights(const LightsState* ls, GameController gc, std
return CONTROLLER_SEXTET_COUNT;
}
inline size_t packLine(std::uint8_t* buffer, const LightsState* ls)
inline size_t packLine(uint8_t* buffer, const LightsState* ls)
{
size_t index = 0;
+1 -1
View File
@@ -77,7 +77,7 @@ void LoadingWindow_Gtk::SetText( RString s )
static void DeletePixels( guchar *pixels, gpointer data )
{
delete[] (std::uint8_t *)pixels;
delete[] (uint8_t *)pixels;
}
static GdkPixbuf *MakePixbuf( const RageSurface *pSrc )
@@ -9,7 +9,7 @@
#include <objc/objc.h>
typedef const struct __CFDictionary *CFDictionaryRef;
typedef std::uint32_t CGDirectDisplayID;
typedef uint32_t CGDirectDisplayID;
class LowLevelWindow_MacOSX : public LowLevelWindow
{
@@ -190,7 +190,7 @@ public:
RenderTarget_MacOSX( id shareContext );
~RenderTarget_MacOSX();
void Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut );
std::uintptr_t GetTexture() const { return static_cast<std::uintptr_t>(m_iTexHandle); }
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_iTexHandle); }
void StartRenderingTo();
void FinishRenderingTo();
@@ -326,11 +326,11 @@ void *LowLevelWindow_MacOSX::GetProcAddress( RString s )
// http://developer.apple.com/qa/qa2001/qa1188.html
// Both functions mentioned in there are deprecated in 10.4.
const RString& symbolName( '_' + s );
const std::uint32_t count = _dyld_image_count();
const uint32_t count = _dyld_image_count();
NSSymbol symbol = nil;
const std::uint32_t options = NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
const uint32_t options = NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
for( std::uint32_t i = 0; i < count && !symbol; ++i )
for( uint32_t i = 0; i < count && !symbol; ++i )
symbol = NSLookupSymbolInImage( _dyld_get_image_header(i), symbolName, options );
return symbol ? NSAddressOfSymbol( symbol ) : nil;
}
@@ -325,7 +325,7 @@ public:
virtual ~RenderTarget_Win32();
void Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut );
std::uintptr_t GetTexture() const { return static_cast<std::uintptr_t>(m_texHandle); }
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_texHandle); }
void StartRenderingTo();
void FinishRenderingTo();
@@ -321,7 +321,7 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
// If an output name has been specified, search for it
RROutput targetOut = None;
if (p.sDisplayId.length() > 0) {
for (unsigned int i = 0; i < static_cast<std::uint32_t>(scrRes->noutput) && targetOut == None; ++i) {
for (unsigned int i = 0; i < static_cast<uint32_t>(scrRes->noutput) && targetOut == None; ++i) {
XRROutputInfo *outInfo = XRRGetOutputInfo(Dpy, scrRes, scrRes->outputs[i]);
std::string outName = std::string(outInfo->name, static_cast<unsigned int> (outInfo->nameLen));
if (p.sDisplayId == outName) {
@@ -341,7 +341,7 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
// (it is possible the connection state could be unknown), we'll at least
// look for an output with a CRTC driving it
RROutput connected = None, hasCrtc = None;
for (unsigned int i = 0; i < static_cast<std::uint32_t>(scrRes->noutput); ++i) {
for (unsigned int i = 0; i < static_cast<uint32_t>(scrRes->noutput); ++i) {
XRROutputInfo *outInfo = XRRGetOutputInfo(Dpy, scrRes, scrRes->outputs[i]);
if (outInfo->connection == RR_Connected) { // Check for CONNECTED state: Connected == 0
connected = scrRes->outputs[i];
@@ -368,7 +368,7 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
RRCrtc tgtOutCrtc = tgtOutInfo->crtc;
if (tgtOutCrtc == None)
{
for (unsigned int i = 0; i < static_cast<std::uint32_t>(tgtOutInfo->ncrtc); ++i)
for (unsigned int i = 0; i < static_cast<uint32_t>(tgtOutInfo->ncrtc); ++i)
{
XRRCrtcInfo *crtcInfo = XRRGetCrtcInfo( Dpy, scrRes, tgtOutInfo->crtcs[i] );
if (crtcInfo->mode == None)
@@ -396,7 +396,7 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
const XRRModeInfo &thisMI = scrRes->modes[i];
const unsigned int modeWidth = bPortrait ? thisMI.height : thisMI.width;
const unsigned int modeHeight = bPortrait ? thisMI.width : thisMI.height;
if (p.width >= 0 && p.height >= 0 && modeWidth == static_cast<std::uint32_t>(p.width) && modeHeight == static_cast<std::uint32_t>(p.height)) {
if (p.width >= 0 && p.height >= 0 && modeWidth == static_cast<uint32_t>(p.width) && modeHeight == static_cast<uint32_t>(p.height)) {
float fTempRefresh = calcRandRRefresh(thisMI.dotClock, thisMI.hTotal, thisMI.vTotal);
float fTempDiff = std::abs(p.rate - fTempRefresh);
if ((p.rate != REFRESH_DEFAULT && fTempDiff < fRefreshDiff) ||
@@ -670,11 +670,11 @@ void LowLevelWindow_X11::GetDisplaySpecs(DisplaySpecs &out) const {
int nsizes = 0;
XRRScreenSize *screenSizes = XRRSizes( Dpy, screenNum, &nsizes);
DisplayMode screenCurMode{};
for (unsigned int szIdx = 0, mode_idx = 0; nsizes >= 0 && szIdx < static_cast<std::uint32_t>(nsizes); ++szIdx) {
for (unsigned int szIdx = 0, mode_idx = 0; nsizes >= 0 && szIdx < static_cast<uint32_t>(nsizes); ++szIdx) {
XRRScreenSize &size = screenSizes[szIdx];
int nrates = 0;
short *rates = XRRRates(Dpy, screenNum, szIdx, &nrates);
for (unsigned int rIdx = 0; nrates >=0 && rIdx < static_cast<std::uint32_t>(nrates); ++rIdx, ++mode_idx) {
for (unsigned int rIdx = 0; nrates >=0 && rIdx < static_cast<uint32_t>(nrates); ++rIdx, ++mode_idx) {
DisplayMode m = {static_cast<unsigned int> (size.width), static_cast<unsigned int> (size.height), static_cast<double> (rates[rIdx])};
screenModes.insert(m);
if (rates[rIdx] == curRate && szIdx == curSizeId) {
@@ -704,7 +704,7 @@ void LowLevelWindow_X11::GetDisplaySpecs(DisplaySpecs &out) const {
}
// Now, for each output, build a corresponding DisplaySpec
for (unsigned int outIdx = 0; outIdx < static_cast<std::uint32_t>(scrRes->noutput); ++outIdx)
for (unsigned int outIdx = 0; outIdx < static_cast<uint32_t>(scrRes->noutput); ++outIdx)
{
XRROutputInfo *outInfo = XRRGetOutputInfo( Dpy, scrRes, scrRes->outputs[outIdx] );
if (outInfo->nmode > 0)
@@ -727,7 +727,7 @@ void LowLevelWindow_X11::GetDisplaySpecs(DisplaySpecs &out) const {
std::set<DisplayMode> outputSupported;
DisplayMode outputCurMode{};
RectI outBounds;
for (unsigned int modeIdx = 0; modeIdx < static_cast<std::uint32_t>(outInfo->nmode); ++modeIdx)
for (unsigned int modeIdx = 0; modeIdx < static_cast<uint32_t>(outInfo->nmode); ++modeIdx)
{
DisplayMode mode = outputModes[outInfo->modes[modeIdx]];
unsigned int modeWidth = bPortrait ? mode.height : mode.width;
@@ -768,7 +768,7 @@ public:
~RenderTarget_X11();
void Create( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut );
std::uintptr_t GetTexture() const { return static_cast<std::uintptr_t>(m_iTexHandle); }
uintptr_t GetTexture() const { return static_cast<uintptr_t>(m_iTexHandle); }
void StartRenderingTo();
void FinishRenderingTo();
@@ -206,7 +206,7 @@ void MemoryCardDriverThreaded_MacOSX::GetUSBStorageDevices( std::vector<UsbStora
LOG->Trace( "Found memory card at path: %s.", fs[i].f_mntonname );
usbd.SetOsMountDir( fs[i].f_mntonname );
usbd.iVolumeSizeMB = int( (std::uint64_t(fs[i].f_blocks) * fs[i].f_bsize) >> 20 );
usbd.iVolumeSizeMB = int( (uint64_t(fs[i].f_blocks) * fs[i].f_bsize) >> 20 );
// Now we can get some more information from the registry tree.
usbd.iBus = GetIntProperty( device, CFSTR("USB Address") );
@@ -497,7 +497,7 @@ static RString averr_ssprintf(int err, const char* fmt, ...)
return s + " (" + Error + ")";
}
static int AVIORageFile_ReadPacket(void* opaque, std::uint8_t* buf, int buf_size)
static int AVIORageFile_ReadPacket(void* opaque, uint8_t* buf, int buf_size)
{
RageFile* f = (RageFile*)opaque;
int n = f->Read(buf, buf_size);
+1 -1
View File
@@ -186,7 +186,7 @@ private:
static struct AVPixelFormat_t
{
int bpp;
std::uint32_t masks[4];
uint32_t masks[4];
avcodec::AVPixelFormat pf;
bool bHighColor;
bool bByteSwapOnLittleEndian;
@@ -142,7 +142,7 @@ public:
virtual void Invalidate() { m_uTexHandle = 0; }
virtual void Reload() { }
virtual std::uintptr_t GetTexHandle() const
virtual uintptr_t GetTexHandle() const
{
return m_uTexHandle;
}
@@ -165,7 +165,7 @@ private:
delete pSurface;
}
std::uintptr_t m_uTexHandle;
uintptr_t m_uTexHandle;
RageSurfaceFormat m_SurfaceFormat;
RagePixelFormat m_PixFmt;
};
@@ -339,7 +339,7 @@ void MovieTexture_Generic::UpdateFrame()
if(m_pTextureLock != nullptr)
{
std::uintptr_t iHandle = m_pTextureIntermediate != nullptr ? m_pTextureIntermediate->GetTexHandle(): this->GetTexHandle();
uintptr_t iHandle = m_pTextureIntermediate != nullptr ? m_pTextureIntermediate->GetTexHandle(): this->GetTexHandle();
m_pTextureLock->Lock(iHandle, m_pSurface);
}
@@ -437,7 +437,7 @@ void MovieTexture_Generic::SetPosition(float fSeconds)
m_pDecoder->Rewind();
}
std::uintptr_t MovieTexture_Generic::GetTexHandle() const
uintptr_t MovieTexture_Generic::GetTexHandle() const
{
if( m_pRenderTarget != nullptr )
return m_pRenderTarget->GetTexHandle();
+2 -2
View File
@@ -103,7 +103,7 @@ public:
virtual void UpdateMovie( float fSeconds );
virtual void SetPlaybackRate( float fRate ) { m_fRate = fRate; }
void SetLooping( bool bLooping=true ) { m_bLoop = bLooping; }
std::uintptr_t GetTexHandle() const;
uintptr_t GetTexHandle() const;
static EffectMode GetEffectMode( MovieDecoderPixelFormatYCbCr fmt );
@@ -119,7 +119,7 @@ private:
// If true, halts all decoding and display.
bool m_failure = false;
std::uintptr_t m_uTexHandle;
uintptr_t m_uTexHandle;
RageTextureRenderTarget *m_pRenderTarget;
RageTexture *m_pTextureIntermediate;
Sprite *m_pSprite;
+2 -2
View File
@@ -13,7 +13,7 @@ public:
MovieTexture_Null(RageTextureID ID);
virtual ~MovieTexture_Null();
void Invalidate() { texHandle = 0; }
std::uintptr_t GetTexHandle() const { return texHandle; }
uintptr_t GetTexHandle() const { return texHandle; }
void Update(float /* delta */) { }
void Reload() { }
void SetPosition(float /* seconds */) { }
@@ -23,7 +23,7 @@ public:
private:
bool playing;
bool loop;
std::uintptr_t texHandle;
uintptr_t texHandle;
};
MovieTexture_Null::MovieTexture_Null(RageTextureID ID) : RageMovieTexture(ID)
@@ -519,14 +519,14 @@ std::int64_t RageSoundDriver::GetHardwareFrame( RageTimer *pTimestamp=nullptr )
*/
int iTries = 3;
std::int64_t iPositionFrames;
std::uint64_t iStartTime;
const std::uint64_t iThreshold = 2000ULL;
uint64_t iStartTime;
const uint64_t iThreshold = 2000ULL;
do
{
iStartTime = RageTimer::GetTimeSinceStartMicroseconds();
iPositionFrames = GetPosition();
std::uint64_t elapsedTime = RageTimer::GetTimeSinceStartMicroseconds() - iStartTime;
uint64_t elapsedTime = RageTimer::GetTimeSinceStartMicroseconds() - iStartTime;
if (elapsedTime <= iThreshold) break;
} while (--iTries);
@@ -184,7 +184,7 @@ void RageSoundDriver_PulseAudio::m_InitStream(void)
*
* "The server tries to assure that at least tlength bytes are always
* available in the per-stream server-side playback buffer. It is
* recommended to set this to (std::uint32_t) -1, which will initialize
* recommended to set this to (uint32_t) -1, which will initialize
* this to a value that is deemed sensible by the server. However,
* this value will default to something like 2s, i.e. for applications
* that have specific latency requirements this value should be set to
@@ -197,10 +197,10 @@ void RageSoundDriver_PulseAudio::m_InitStream(void)
/* maxlength: Maximum length of the buffer
*
* "Setting this to (std::uint32_t) -1 will initialize this to the maximum
* "Setting this to (uint32_t) -1 will initialize this to the maximum
* value supported by server, which is recommended."
*
* (std::uint32_t)-1 is NOT working here, setting it to tlength*2, like
* (uint32_t)-1 is NOT working here, setting it to tlength*2, like
* openal-soft-pulseaudio does.
*/
attr.maxlength = attr.tlength*2;
@@ -209,10 +209,10 @@ void RageSoundDriver_PulseAudio::m_InitStream(void)
*
* "The server does not request less than minreq bytes from the client,
* instead waits until the buffer is free enough to request more bytes
* at once. It is recommended to set this to (std::uint32_t) -1, which will
* at once. It is recommended to set this to (uint32_t) -1, which will
* initialize this to a value that is deemed sensible by the server."
*
* (std::uint32_t)-1 is NOT working here, setting it to 0, like
* (uint32_t)-1 is NOT working here, setting it to 0, like
* openal-soft-pulseaudio does.
*/
attr.minreq = 0;
@@ -221,10 +221,10 @@ void RageSoundDriver_PulseAudio::m_InitStream(void)
*
* "The server does not start with playback before at least prebuf
* bytes are available in the buffer. It is recommended to set this
* to (std::uint32_t) -1, which will initialize this to the same value as
* to (uint32_t) -1, which will initialize this to the same value as
* tlength"
*/
attr.prebuf = (std::uint32_t)-1;
attr.prebuf = (uint32_t)-1;
/* log the used target buffer length */
LOG->Trace("Pulse: using target buffer length of %i bytes", attr.tlength);
+1 -1
View File
@@ -1142,7 +1142,7 @@ void RageSoundDriver_WDMKS::Read( void *pData, int iFrames, int iLastCursorPos,
bool RageSoundDriver_WDMKS::Fill( int iPacket, RString &sError )
{
std::uint64_t iCurrentFrame = GetPosition();
uint64_t iCurrentFrame = GetPosition();
// if( iCurrentFrame == m_iLastCursorPos )
// LOG->Trace( "underrun" );
+4 -4
View File
@@ -18,7 +18,7 @@ public:
* implementation-defined, except that each thread has exactly one ID
* and each ID corresponds to one thread. (This means that Win32
* thread handles are not acceptable as ThreadIds.) */
virtual std::uint64_t GetThreadId() const = 0;
virtual uint64_t GetThreadId() const = 0;
virtual int Wait() = 0;
};
@@ -71,16 +71,16 @@ public:
};
// These functions must be implemented by the thread implementation.
ThreadImpl *MakeThread( int (*fn)(void *), void *data, std::uint64_t *piThreadID );
ThreadImpl *MakeThread( int (*fn)(void *), void *data, uint64_t *piThreadID );
ThreadImpl *MakeThisThread();
MutexImpl *MakeMutex( RageMutex *pParent );
EventImpl *MakeEvent( MutexImpl *pMutex );
SemaImpl *MakeSemaphore( int iInitialValue );
std::uint64_t GetThisThreadId();
uint64_t GetThisThreadId();
/* Since ThreadId is implementation-defined, we can't define a universal
* invalid value. Return the invalid value for this implementation. */
std::uint64_t GetInvalidThreadId();
uint64_t GetInvalidThreadId();
#endif
+4 -4
View File
@@ -38,7 +38,7 @@ void ThreadImpl_Pthreads::Resume()
ResumeThread( threadHandle );
}
std::uint64_t ThreadImpl_Pthreads::GetThreadId() const
uint64_t ThreadImpl_Pthreads::GetThreadId() const
{
return threadHandle;
}
@@ -79,7 +79,7 @@ static void *StartThread( void *pData )
return new int(iRet);
}
ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, std::uint64_t *piThreadID )
ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThreadID )
{
ThreadImpl_Pthreads *thread = new ThreadImpl_Pthreads;
thread->m_pFunc = pFunc;
@@ -227,12 +227,12 @@ void MutexImpl_Pthreads::Unlock()
pthread_mutex_unlock( &mutex );
}
std::uint64_t GetThisThreadId()
uint64_t GetThisThreadId()
{
return GetCurrentThreadId();
}
std::uint64_t GetInvalidThreadId()
uint64_t GetInvalidThreadId()
{
return 0;
}
+3 -3
View File
@@ -18,17 +18,17 @@ public:
* Keep a list of child PIDs, so we can send them SIGKILL. This has
* an added bonus: if this is corrupted, we'll just send signals and
* they'll fail; we won't blow up (unless we're root). */
std::uint64_t threadHandle;
uint64_t threadHandle;
// These are only used during initialization.
int (*m_pFunc)( void *pData );
void *m_pData;
std::uint64_t *m_piThreadID;
uint64_t *m_piThreadID;
SemaImpl *m_StartFinishedSem;
void Halt( bool Kill );
void Resume();
std::uint64_t GetThreadId() const;
uint64_t GetThreadId() const;
int Wait();
};
+9 -9
View File
@@ -17,10 +17,10 @@ static void InitThreadIdMutex()
g_pThreadIdMutex = new MutexImpl_Win32(nullptr);
}
static std::uint64_t g_ThreadIds[MAX_THREADS];
static uint64_t g_ThreadIds[MAX_THREADS];
static HANDLE g_ThreadHandles[MAX_THREADS];
HANDLE Win32ThreadIdToHandle( std::uint64_t iID )
HANDLE Win32ThreadIdToHandle( uint64_t iID )
{
for( int i = 0; i < MAX_THREADS; ++i )
{
@@ -44,9 +44,9 @@ void ThreadImpl_Win32::Resume()
ResumeThread( ThreadHandle );
}
std::uint64_t ThreadImpl_Win32::GetThreadId() const
uint64_t ThreadImpl_Win32::GetThreadId() const
{
return (std::uint64_t) ThreadId;
return (uint64_t) ThreadId;
}
int ThreadImpl_Win32::Wait()
@@ -112,7 +112,7 @@ static DWORD WINAPI StartThread( LPVOID pData )
return ret;
}
static int GetOpenSlot( std::uint64_t iID )
static int GetOpenSlot( uint64_t iID )
{
InitThreadIdMutex();
@@ -157,14 +157,14 @@ ThreadImpl *MakeThisThread()
return thread;
}
ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, std::uint64_t *piThreadID )
ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThreadID )
{
ThreadImpl_Win32 *thread = new ThreadImpl_Win32;
thread->m_pFunc = pFunc;
thread->m_pData = pData;
thread->ThreadHandle = CreateThread( nullptr, 0, &StartThread, thread, CREATE_SUSPENDED, &thread->ThreadId );
*piThreadID = (std::uint64_t) thread->ThreadId;
*piThreadID = (uint64_t) thread->ThreadId;
ASSERT_M( thread->ThreadHandle != nullptr, ssprintf("%s", werr_ssprintf(GetLastError(), "CreateThread").c_str() ) );
int slot = GetOpenSlot( thread->ThreadId );
@@ -248,12 +248,12 @@ void MutexImpl_Win32::Unlock()
sm_crash( werr_ssprintf( GetLastError(), "ReleaseMutex failed" ) );
}
std::uint64_t GetThisThreadId()
uint64_t GetThisThreadId()
{
return GetCurrentThreadId();
}
std::uint64_t GetInvalidThreadId()
uint64_t GetInvalidThreadId()
{
return 0;
}
+2 -2
View File
@@ -21,11 +21,11 @@ public:
void Halt( bool Kill );
void Resume();
std::uint64_t GetThreadId() const;
uint64_t GetThreadId() const;
int Wait();
};
HANDLE Win32ThreadIdToHandle( std::uint64_t iID );
HANDLE Win32ThreadIdToHandle( uint64_t iID );
class MutexImpl_Win32: public MutexImpl
{