mirror of https://github.com/mgba-emu/mgba.git
All: Fix whitespace errors
This commit is contained in:
parent
8941f74292
commit
bfc52cd2f0
|
@ -11,15 +11,15 @@
|
|||
CXX_GUARD_START
|
||||
|
||||
struct mSize {
|
||||
int width;
|
||||
int height;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
struct mRectangle {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
void mRectangleUnion(struct mRectangle* dst, const struct mRectangle* add);
|
||||
|
|
|
@ -57,7 +57,7 @@ struct mVideoBackendCommand {
|
|||
struct mVideoProxyBackend {
|
||||
struct VideoBackend d;
|
||||
struct VideoBackend* backend;
|
||||
|
||||
|
||||
struct RingFIFO in;
|
||||
struct RingFIFO out;
|
||||
|
||||
|
|
|
@ -9,23 +9,23 @@
|
|||
#define mSAVEDATA_CLEANUP_THRESHOLD 15
|
||||
|
||||
enum {
|
||||
mSAVEDATA_DIRT_NONE = 0,
|
||||
mSAVEDATA_DIRT_NONE = 0,
|
||||
mSAVEDATA_DIRT_NEW = 1,
|
||||
mSAVEDATA_DIRT_SEEN = 2,
|
||||
};
|
||||
|
||||
static inline bool mSavedataClean(int* dirty, uint32_t* dirtAge, uint32_t frameCount) {
|
||||
if (*dirty & mSAVEDATA_DIRT_NEW) {
|
||||
*dirtAge = frameCount;
|
||||
*dirty &= ~mSAVEDATA_DIRT_NEW;
|
||||
if (!(*dirty & mSAVEDATA_DIRT_SEEN)) {
|
||||
*dirty |= mSAVEDATA_DIRT_SEEN;
|
||||
}
|
||||
} else if ((*dirty & mSAVEDATA_DIRT_SEEN) && frameCount - *dirtAge > mSAVEDATA_CLEANUP_THRESHOLD) {
|
||||
*dirty = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if (*dirty & mSAVEDATA_DIRT_NEW) {
|
||||
*dirtAge = frameCount;
|
||||
*dirty &= ~mSAVEDATA_DIRT_NEW;
|
||||
if (!(*dirty & mSAVEDATA_DIRT_SEEN)) {
|
||||
*dirty |= mSAVEDATA_DIRT_SEEN;
|
||||
}
|
||||
} else if ((*dirty & mSAVEDATA_DIRT_SEEN) && frameCount - *dirtAge > mSAVEDATA_CLEANUP_THRESHOLD) {
|
||||
*dirty = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -88,7 +88,7 @@ DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LSR1,
|
|||
}
|
||||
THUMB_NEUTRAL_S( , , cpu->gprs[rd]);)
|
||||
|
||||
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(ASR1,
|
||||
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(ASR1,
|
||||
if (!immediate) {
|
||||
cpu->cpsr.c = ARM_SIGN(cpu->gprs[rm]);
|
||||
if (cpu->cpsr.c) {
|
||||
|
|
|
@ -37,7 +37,7 @@ static uint32_t _patchMakeKey(struct mCheatPatch* patch) {
|
|||
patchKey >>= 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
// TODO: More than one segment
|
||||
if (patch->segment > 0) {
|
||||
|
|
|
@ -656,7 +656,7 @@ void mCoreThreadContinue(struct mCoreThread* threadContext) {
|
|||
if (threadContext->impl->requested) {
|
||||
threadContext->impl->state = mTHREAD_REQUEST;
|
||||
} else {
|
||||
threadContext->impl->state = mTHREAD_RUNNING;
|
||||
threadContext->impl->state = mTHREAD_RUNNING;
|
||||
}
|
||||
ConditionWake(&threadContext->impl->stateOnThreadCond);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ bool FFmpegDecoderOpen(struct FFmpegDecoder* decoder, const char* infile) {
|
|||
codec = avcodec_find_decoder(context->codec_id);
|
||||
if (!codec) {
|
||||
FFmpegDecoderClose(decoder);
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
if (avcodec_open2(context, codec, NULL) < 0) {
|
||||
FFmpegDecoderClose(decoder);
|
||||
|
|
|
@ -893,7 +893,7 @@ void FFmpegEncoderSetInputFrameRate(struct FFmpegEncoder* encoder, int numerator
|
|||
|
||||
void FFmpegEncoderSetInputSampleRate(struct FFmpegEncoder* encoder, int sampleRate) {
|
||||
encoder->isampleRate = sampleRate;
|
||||
if (encoder->resampleContext) {
|
||||
if (encoder->resampleContext) {
|
||||
av_freep(&encoder->audioBuffer);
|
||||
#ifdef USE_LIBAVRESAMPLE
|
||||
avresample_close(encoder->resampleContext);
|
||||
|
|
|
@ -295,7 +295,7 @@ void mGUIShowConfig(struct mGUIRunner* runner, struct GUIMenuItem* extra, size_t
|
|||
test.v.s = mCoreConfigGetValue(&runner->config, item->data.v.s);
|
||||
if (test.v.s && strcmp(test.v.s, v->v.s) == 0) {
|
||||
item->state = j;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GUI_VARIANT_POINTER:
|
||||
|
|
|
@ -46,7 +46,7 @@ static void _updateList(const char* key, const char* value, void* user) {
|
|||
if (strncmp("medusa.", key, 7) == 0) {
|
||||
dotLoc = strchr(&key[7], '.');
|
||||
} else {
|
||||
dotLoc = strchr(key, '.');
|
||||
dotLoc = strchr(key, '.');
|
||||
}
|
||||
if (!dotLoc) {
|
||||
return;
|
||||
|
|
|
@ -339,17 +339,17 @@ bool mVideoLoggerRendererRunInjected(struct mVideoLogger* logger) {
|
|||
channel->injecting = true;
|
||||
bool res = mVideoLoggerRendererRun(logger, false);
|
||||
channel->injecting = false;
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
void mVideoLoggerInjectionPoint(struct mVideoLogger* logger, enum mVideoLoggerInjectionPoint injectionPoint) {
|
||||
struct mVideoLogChannel* channel = logger->dataContext;
|
||||
channel->injectionPoint = injectionPoint;
|
||||
channel->injectionPoint = injectionPoint;
|
||||
}
|
||||
|
||||
void mVideoLoggerIgnoreAfterInjection(struct mVideoLogger* logger, uint32_t mask) {
|
||||
struct mVideoLogChannel* channel = logger->dataContext;
|
||||
channel->ignorePackets = mask;
|
||||
channel->ignorePackets = mask;
|
||||
}
|
||||
|
||||
static bool _writeData(struct mVideoLogger* logger, const void* data, size_t length) {
|
||||
|
|
|
@ -152,7 +152,7 @@ static bool _GBCoreInit(struct mCore* core) {
|
|||
#ifdef ENABLE_VFS
|
||||
mDirectorySetInit(&core->dirs);
|
||||
#endif
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ void GBVideoProxyRendererDrawRange(struct GBVideoRenderer* renderer, int startX,
|
|||
_copyExtraState(proxyRenderer);
|
||||
proxyRenderer->backend->drawRange(proxyRenderer->backend, startX, endX, y);
|
||||
}
|
||||
mVideoLoggerRendererDrawRange(proxyRenderer->logger, startX, endX, y);
|
||||
mVideoLoggerRendererDrawRange(proxyRenderer->logger, startX, endX, y);
|
||||
}
|
||||
|
||||
void GBVideoProxyRendererFinishScanline(struct GBVideoRenderer* renderer, int y) {
|
||||
|
|
|
@ -152,7 +152,7 @@ bool GBLoadGBX(struct GBXMetadata* metadata, struct VFile* vf) {
|
|||
if (memcmp(footer, "MBC1", 4) == 0) {
|
||||
metadata->mapperVars.u8[0] = 5;
|
||||
} else if (memcmp(footer, "MB1M", 4) == 0) {
|
||||
metadata->mapperVars.u8[0] = 4;
|
||||
metadata->mapperVars.u8[0] = 4;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -894,7 +894,7 @@ int GBValidModels(const uint8_t* bank0) {
|
|||
} else if (cart->cgb == 0xC0) {
|
||||
models = GB_MODEL_CGB;
|
||||
} else {
|
||||
models = GB_MODEL_MGB;
|
||||
models = GB_MODEL_MGB;
|
||||
}
|
||||
if (cart->sgb == 0x03 && cart->oldLicensee == 0x33) {
|
||||
models |= GB_MODEL_SGB;
|
||||
|
|
|
@ -163,7 +163,7 @@ static bool _isMulticart(const uint8_t* mem) {
|
|||
success = GBIsROM(vf);
|
||||
vf->close(vf);
|
||||
}
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ static void _latchTAMA6Rtc(struct mRTCSource* rtc, struct GBTAMA5State* tama5, t
|
|||
timerRegs[GBTAMA6_RTC_PA0_HOUR_10] = (diff % 24) / 10;
|
||||
} else {
|
||||
timerRegs[GBTAMA6_RTC_PA0_HOUR_1] = (diff % 12) % 10;
|
||||
timerRegs[GBTAMA6_RTC_PA0_HOUR_10] = (diff % 12) / 10 + (diff / 12) * 2;
|
||||
timerRegs[GBTAMA6_RTC_PA0_HOUR_10] = (diff % 12) / 10 + (diff / 12) * 2;
|
||||
}
|
||||
t /= 24;
|
||||
t += diff / 24;
|
||||
|
|
|
@ -349,7 +349,7 @@ void _GBHitek(struct GB* gb, uint16_t address, uint8_t value) {
|
|||
break;
|
||||
case 0x300:
|
||||
// See hhugboy src/memory/mbc/MbcUnlHitek.cpp for commentary on this return
|
||||
return;
|
||||
return;
|
||||
}
|
||||
_GBMBC5(gb, address, value);
|
||||
}
|
||||
|
@ -396,10 +396,10 @@ uint8_t _GBGGB81Read(struct GBMemory* memory, uint16_t address) {
|
|||
}
|
||||
|
||||
void _GBLiCheng(struct GB* gb, uint16_t address, uint8_t value) {
|
||||
if (address > 0x2100 && address < 0x3000) {
|
||||
return;
|
||||
}
|
||||
_GBMBC5(gb, address, value);
|
||||
if (address > 0x2100 && address < 0x3000) {
|
||||
return;
|
||||
}
|
||||
_GBMBC5(gb, address, value);
|
||||
}
|
||||
|
||||
void _GBSachen(struct GB* gb, uint16_t address, uint8_t value) {
|
||||
|
|
|
@ -755,7 +755,7 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) {
|
|||
video->ly = 0;
|
||||
video->p->memory.io[GB_REG_LY] = 0;
|
||||
video->renderer->writePalette(video->renderer, 0, video->dmgPalette[0]);
|
||||
|
||||
|
||||
mTimingDeschedule(&video->p->timing, &video->modeEvent);
|
||||
mTimingDeschedule(&video->p->timing, &video->frameEvent);
|
||||
mTimingSchedule(&video->p->timing, &video->frameEvent, GB_VIDEO_TOTAL_LENGTH << 1);
|
||||
|
|
|
@ -324,7 +324,7 @@ void GBAVideoProxyRendererSaveState(struct GBAVideoRenderer* renderer, void** st
|
|||
proxyRenderer->logger->stateSize = 0;
|
||||
} else {
|
||||
proxyRenderer->backend->saveState(proxyRenderer->backend, state, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GBAVideoProxyRendererWriteVRAM(struct GBAVideoRenderer* renderer, uint32_t address) {
|
||||
|
|
|
@ -195,7 +195,7 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
|
|||
if (GBASerializedMiscFlagsIsIrqPending(miscFlags)) {
|
||||
int32_t when;
|
||||
LOAD_32(when, 0, &state->nextIrq);
|
||||
mTimingSchedule(&gba->timing, &gba->irqEvent, when);
|
||||
mTimingSchedule(&gba->timing, &gba->irqEvent, when);
|
||||
}
|
||||
gba->cpuBlocked = GBASerializedMiscFlagsGetBlocked(miscFlags);
|
||||
gba->keysLast = GBASerializedMiscFlagsGetKeyIRQKeys(miscFlags);
|
||||
|
|
|
@ -160,7 +160,7 @@ void ctrActivateTexture(const C3D_Tex* texture) {
|
|||
.m = {
|
||||
// Rows are in the order w z y x, because ctrulib
|
||||
0.0f, 0.0f, 0.0f, 1.0f / activeTexture->width,
|
||||
0.0f, 0.0f, 1.0f / activeTexture->height, 0.0f
|
||||
0.0f, 0.0f, 1.0f / activeTexture->height, 0.0f
|
||||
}
|
||||
};
|
||||
C3D_FVUnifMtx2x4(GPU_GEOMETRY_SHADER, GSH_FVEC_textureMtx, &textureMtx);
|
||||
|
|
|
@ -53,7 +53,7 @@ int main(int argc, char** argv) {
|
|||
SocketClose(sock);
|
||||
SocketSubsystemDeinit();
|
||||
didFail = true;
|
||||
goto cleanup;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
// Run the server
|
||||
|
|
|
@ -253,7 +253,7 @@ static void mGLContextImageSize(struct VideoBackend* v, enum VideoLayer layer, i
|
|||
*height = context->layerDims[layer].height;
|
||||
} else {
|
||||
*width = context->imageSizes[layer].width;
|
||||
*height = context->imageSizes[layer].height;
|
||||
*height = context->imageSizes[layer].height;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ void mGLContextPostFrame(struct VideoBackend* v, enum VideoLayer layer, const vo
|
|||
context->activeTex ^= 1;
|
||||
glBindTexture(GL_TEXTURE_2D, context->tex[context->activeTex]);
|
||||
} else {
|
||||
glBindTexture(GL_TEXTURE_2D, context->layers[layer]);
|
||||
glBindTexture(GL_TEXTURE_2D, context->layers[layer]);
|
||||
}
|
||||
|
||||
int width = context->imageSizes[layer].width;
|
||||
|
|
|
@ -529,7 +529,7 @@ static void mGLES2ContextImageSize(struct VideoBackend* v, enum VideoLayer layer
|
|||
*height = context->layerDims[layer].height;
|
||||
} else {
|
||||
*width = context->imageSizes[layer].width;
|
||||
*height = context->imageSizes[layer].height;
|
||||
*height = context->imageSizes[layer].height;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -617,7 +617,7 @@ void mGLES2ShaderInit(struct mGLES2Shader* shader, const char* vs, const char* f
|
|||
if (shader->width > 0 && shader->height > 0) {
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, shader->width, shader->height, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
|
||||
} else {
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 512, 512, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
|
||||
}
|
||||
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, shader->tex, 0);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#ifndef PSP2_COMMON_H
|
||||
#define PSP2_COMMON_H
|
||||
|
||||
|
||||
#include <mgba-util/common.h>
|
||||
|
||||
#define PSP2_HORIZONTAL_PIXELS 960
|
||||
|
|
|
@ -216,7 +216,7 @@ void BattleChipView::loadDeck() {
|
|||
error->show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QList<int> newDeck;
|
||||
QStringList deck = ini.value("deck").toString().split(',');
|
||||
for (const auto& item : deck) {
|
||||
|
|
|
@ -130,7 +130,7 @@ private:
|
|||
mGraphicsOpts m_graphicsOpts{};
|
||||
std::array<mSubParser, 2> m_subparsers;
|
||||
bool m_parsed = false;
|
||||
|
||||
|
||||
QHash<QString, QVariant> m_argvOptions;
|
||||
QHash<QString, ConfigOption*> m_optionSet;
|
||||
std::unique_ptr<QSettings> m_settings;
|
||||
|
|
|
@ -162,7 +162,7 @@ void DebuggerConsoleController::historyLoad() {
|
|||
if (line.endsWith("\r\n")) {
|
||||
line.chop(2);
|
||||
} else if (line.endsWith("\n")) {
|
||||
line.chop(1);
|
||||
line.chop(1);
|
||||
}
|
||||
history.append(QString::fromUtf8(line));
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
virtual void setVideoProxy(std::shared_ptr<VideoProxy> proxy) { m_videoProxy = std::move(proxy); }
|
||||
std::shared_ptr<VideoProxy> videoProxy() { return m_videoProxy; }
|
||||
virtual VideoBackend* videoBackend();
|
||||
|
||||
|
||||
signals:
|
||||
void drawingStarted();
|
||||
void showCursor();
|
||||
|
|
|
@ -314,7 +314,7 @@ bool DisplayGL::highestCompatible(QSurfaceFormat& format) {
|
|||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
|
||||
format.setVersion(1, 4);
|
||||
} else {
|
||||
format.setVersion(1, 1);
|
||||
format.setVersion(1, 1);
|
||||
}
|
||||
format.setOption(QSurfaceFormat::DeprecatedFunctions);
|
||||
if (DisplayGL::supportsFormat(format)) {
|
||||
|
|
|
@ -160,7 +160,7 @@ void ForwarderController::gotManifest(QNetworkReply* reply) {
|
|||
mUpdaterGetUpdateForChannel(&context, platform.toUtf8().constData(), m_channel.toUtf8().constData(), &update);
|
||||
|
||||
downloadBuild({bucket + update.path});
|
||||
mUpdaterDeinit(&context);
|
||||
mUpdaterDeinit(&context);
|
||||
}
|
||||
|
||||
void ForwarderController::downloadBuild(const QUrl& url) {
|
||||
|
@ -174,7 +174,7 @@ void ForwarderController::downloadBuild(const QUrl& url) {
|
|||
.arg(extension));
|
||||
if (!m_sourceFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
||||
emit buildFailed();
|
||||
return;
|
||||
return;
|
||||
}
|
||||
QNetworkReply* reply = GBAApp::app()->httpGet(url);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void ForwarderView::build() {
|
|||
if (m_ui.baseType->currentIndex() == 2) {
|
||||
m_controller.setBaseFilename(m_ui.baseFilename->text());
|
||||
} else {
|
||||
m_controller.clearBaseFilename();
|
||||
m_controller.clearBaseFilename();
|
||||
}
|
||||
m_controller.startBuild(m_ui.outputFilename->text());
|
||||
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
|
@ -235,14 +235,14 @@ void ForwarderView::updateProgress() {
|
|||
if (m_needsForwarderKit) {
|
||||
m_ui.progressBar->setValue(450 + m_downloadProgress * 50);
|
||||
} else {
|
||||
m_ui.progressBar->setValue(m_downloadProgress * 100);
|
||||
m_ui.progressBar->setValue(m_downloadProgress * 100);
|
||||
}
|
||||
break;
|
||||
case ForwarderController::BASE:
|
||||
if (m_needsForwarderKit) {
|
||||
m_ui.progressBar->setValue(500 + m_downloadProgress * 500);
|
||||
} else {
|
||||
m_ui.progressBar->setValue(100 + m_downloadProgress * 900);
|
||||
m_ui.progressBar->setValue(100 + m_downloadProgress * 900);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ MemorySearch::MemorySearch(std::shared_ptr<CoreController> controller, QWidget*
|
|||
|
||||
mCoreMemorySearchResultsInit(&m_results, 0);
|
||||
connect(m_ui.search, &QPushButton::clicked, this, &MemorySearch::search);
|
||||
connect(m_ui.value, &QLineEdit::returnPressed, this, &MemorySearch::search);
|
||||
connect(m_ui.value, &QLineEdit::returnPressed, this, &MemorySearch::search);
|
||||
connect(m_ui.searchWithin, &QPushButton::clicked, this, &MemorySearch::searchWithin);
|
||||
connect(m_ui.refresh, &QPushButton::clicked, this, &MemorySearch::refresh);
|
||||
connect(m_ui.numHex, &QPushButton::clicked, this, &MemorySearch::refresh);
|
||||
|
|
|
@ -86,18 +86,18 @@ void SaveConverter::refreshInputTypes() {
|
|||
m_validSaves.clear();
|
||||
m_ui.inputType->clear();
|
||||
if (m_ui.inputFile->text().isEmpty()) {
|
||||
m_ui.inputType->addItem(tr("No file selected"));
|
||||
m_ui.inputType->addItem(tr("No file selected"));
|
||||
m_ui.inputType->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
std::shared_ptr<VFileDevice> vf = std::make_shared<VFileDevice>(m_ui.inputFile->text(), QIODevice::ReadOnly);
|
||||
if (!vf->isOpen()) {
|
||||
m_ui.inputType->addItem(tr("Could not open file"));
|
||||
m_ui.inputType->addItem(tr("Could not open file"));
|
||||
m_ui.inputType->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
detectFromSavestate(*vf);
|
||||
detectFromSize(vf);
|
||||
detectFromHeaders(vf);
|
||||
|
@ -108,7 +108,7 @@ void SaveConverter::refreshInputTypes() {
|
|||
if (m_validSaves.count()) {
|
||||
m_ui.inputType->setEnabled(true);
|
||||
} else {
|
||||
m_ui.inputType->addItem(tr("No valid formats found"));
|
||||
m_ui.inputType->addItem(tr("No valid formats found"));
|
||||
m_ui.inputType->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void SaveConverter::refreshOutputTypes() {
|
|||
if (m_validOutputs.count()) {
|
||||
m_ui.outputType->setEnabled(true);
|
||||
} else {
|
||||
m_ui.outputType->addItem(tr("No valid conversions found"));
|
||||
m_ui.outputType->addItem(tr("No valid conversions found"));
|
||||
m_ui.outputType->setEnabled(false);
|
||||
}
|
||||
checkCanConvert();
|
||||
|
@ -494,21 +494,21 @@ SaveConverter::AnnotatedSave::operator QString() const {
|
|||
if (size & 0xFF) {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "%1 SRAM + RTC");
|
||||
} else {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "%1 SRAM");
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "%1 SRAM");
|
||||
}
|
||||
break;
|
||||
case GB_MBC2:
|
||||
if (size == 0x100) {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "packed MBC2");
|
||||
} else {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "unpacked MBC2");
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "unpacked MBC2");
|
||||
}
|
||||
break;
|
||||
case GB_MBC6:
|
||||
if (size == GB_SIZE_MBC6_FLASH) {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "MBC6 flash");
|
||||
} else if (size > GB_SIZE_MBC6_FLASH) {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "MBC6 combined SRAM + flash");
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "MBC6 combined SRAM + flash");
|
||||
} else {
|
||||
typeFormat = QCoreApplication::translate("QGBA::SaveConverter", "MBC6 SRAM");
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ void TilePainter::setTileCount(int tiles) {
|
|||
int w = width() / m_size;
|
||||
int h = (tiles + w - 1) * m_size / w;
|
||||
setMinimumSize(m_size, h - (h % m_size));
|
||||
} else {
|
||||
} else {
|
||||
int w = minimumSize().width() / m_size;
|
||||
if (!w) {
|
||||
w = 1;
|
||||
|
|
|
@ -132,7 +132,7 @@ void TileView::updateTilesGBA(bool force) {
|
|||
if (m_ui.tilesBg->isChecked()) {
|
||||
m_ui.tiles->setTileCount(1024);
|
||||
} else if (m_ui.tilesObj->isChecked()) {
|
||||
m_ui.tiles->setTileCount(512);
|
||||
m_ui.tiles->setTileCount(512);
|
||||
} else {
|
||||
m_ui.tiles->setTileCount(1536);
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ void TileView::updateTilesGBA(bool force) {
|
|||
if (m_ui.tilesBg->isChecked()) {
|
||||
m_ui.tiles->setTileCount(2048);
|
||||
} else if (m_ui.tilesObj->isChecked()) {
|
||||
m_ui.tiles->setTileCount(1024);
|
||||
m_ui.tiles->setTileCount(1024);
|
||||
} else {
|
||||
m_ui.tiles->setTileCount(3072);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ Window::Window(CoreManager* manager, ConfigController* config, int playerId, QWi
|
|||
if (value.toBool()) {
|
||||
attachWidget(m_libraryView);
|
||||
} else {
|
||||
attachWidget(m_screenWidget);
|
||||
attachWidget(m_screenWidget);
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
|
@ -136,8 +136,8 @@ Window::Window(CoreManager* manager, ConfigController* config, int playerId, QWi
|
|||
ConfigOption* showFilenameInLibrary = m_config->addOption("showFilenameInLibrary");
|
||||
showFilenameInLibrary->connect([this](const QVariant& value) {
|
||||
m_libraryView->setShowFilename(value.toBool());
|
||||
}, this);
|
||||
m_config->updateOption("showFilenameInLibrary");
|
||||
}, this);
|
||||
m_config->updateOption("showFilenameInLibrary");
|
||||
ConfigOption* libraryStyle = m_config->addOption("libraryStyle");
|
||||
libraryStyle->connect([this](const QVariant& value) {
|
||||
m_libraryView->setViewStyle(static_cast<LibraryStyle>(value.toInt()));
|
||||
|
|
|
@ -181,7 +181,7 @@ void LibraryTree::rebuildTree() {
|
|||
|
||||
QHash<QString, QTreeWidgetItem*> pathNodes;
|
||||
if (m_currentStyle == LibraryStyle::STYLE_TREE) {
|
||||
for (const QString& folder : m_pathNodes.keys()) {
|
||||
for (const QString& folder : m_pathNodes.keys()) {
|
||||
QTreeWidgetItem* i = new LibraryTreeItem;
|
||||
pathNodes.insert(folder, i);
|
||||
i->setText(0, folder.section("/", -1));
|
||||
|
|
|
@ -107,7 +107,7 @@ void ScriptingTextBuffer::moveCursor(const QPoint& pos) {
|
|||
m_shim.cursor.insertBlock();
|
||||
}
|
||||
} else {
|
||||
m_shim.cursor.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, y);
|
||||
m_shim.cursor.movePosition(QTextCursor::Down, QTextCursor::MoveAnchor, y);
|
||||
}
|
||||
|
||||
int x = pos.x();
|
||||
|
|
|
@ -1143,7 +1143,7 @@ bool _luaInvoke(struct mScriptEngineContextLua* luaContext, struct mScriptFrame*
|
|||
if (ret == LUA_ERRRUN) {
|
||||
luaContext->lastError = strdup(lua_tostring(luaContext->lua, -1));
|
||||
lua_pop(luaContext->lua, 1);
|
||||
|
||||
|
||||
_luaError(luaContext);
|
||||
}
|
||||
mScriptContextDeactivate(luaContext->d.context);
|
||||
|
|
|
@ -1443,7 +1443,7 @@ static struct mScriptClassMember* _findSetter(const struct mScriptTypeClass* cls
|
|||
if (m) {
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
switch (type->base) {
|
||||
case mSCRIPT_TYPE_SINT:
|
||||
if (type->size < 2) {
|
||||
|
|
|
@ -24,7 +24,7 @@ void createSdf(const struct mImage* src, struct mImage* dst, int x, int y, int w
|
|||
if (mImageGetPixel(src, i, j) & 0xFFFFFF) {
|
||||
mImageSetPixelRaw(dst, i, j, 0xFF);
|
||||
} else {
|
||||
mImageSetPixelRaw(dst, i, j, 1);
|
||||
mImageSetPixelRaw(dst, i, j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void mAudioResamplerSetSource(struct mAudioResampler* resampler, struct mAudioBu
|
|||
|
||||
void mAudioResamplerSetDestination(struct mAudioResampler* resampler, struct mAudioBuffer* destination, double rate) {
|
||||
resampler->destination = destination;
|
||||
resampler->destRate = rate;
|
||||
resampler->destRate = rate;
|
||||
}
|
||||
|
||||
size_t mAudioResamplerProcess(struct mAudioResampler* resampler) {
|
||||
|
|
|
@ -103,7 +103,7 @@ uint32_t doCrc32(const void* buf, size_t size) {
|
|||
#ifndef HAVE_CRC32
|
||||
uint32_t crc32(uint32_t crc, const void* buf, size_t size) {
|
||||
const uint8_t* p = buf;
|
||||
|
||||
|
||||
crc = ~crc;
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
crc = crc32Table[(crc ^ p[i]) & 0xFF] ^ (crc >> 8);
|
||||
|
|
|
@ -69,9 +69,9 @@ uint32_t hash32(const void* key, size_t len, uint32_t seed) {
|
|||
k1 *= c1;
|
||||
k1 = ROTL32(k1, 15);
|
||||
k1 *= c2;
|
||||
|
||||
|
||||
h1 ^= k1;
|
||||
h1 = ROTL32(h1, 13);
|
||||
h1 = ROTL32(h1, 13);
|
||||
h1 = h1 * 5 + 0xe6546b64;
|
||||
}
|
||||
|
||||
|
@ -105,4 +105,4 @@ uint32_t hash32(const void* key, size_t len, uint32_t seed) {
|
|||
h1 = fmix32(h1);
|
||||
|
||||
return h1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ bool SfoAddStrValue(struct Table* sfo, const char* name, const char* value) {
|
|||
HashTableInsert(sfo, name, entry);
|
||||
}
|
||||
entry->type = PSF_TYPE_STR;
|
||||
entry->data.str = value;
|
||||
entry->data.str = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue