misc: fix formatting issues

This commit is contained in:
Marcin Kurczewski 2024-08-30 18:13:23 +02:00
parent 641824b5b4
commit 5b2460c484
No known key found for this signature in database
GPG key ID: CC65E6FD28CAE42A
4 changed files with 16 additions and 13 deletions

View file

@ -4,6 +4,8 @@ AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
BasedOnStyle: Webkit BasedOnStyle: Webkit
BreakBeforeBinaryOperators: NonAssignment BreakBeforeBinaryOperators: NonAssignment
BreakAdjacentStringLiterals: true
AlwaysBreakBeforeMultilineStrings: true
ColumnLimit: 80 ColumnLimit: 80
IndentPPDirectives: BeforeHash IndentPPDirectives: BeforeHash
NamespaceIndentation: None NamespaceIndentation: None

View file

@ -1347,8 +1347,9 @@ bool Savegame_BSON_LoadFromFile(MYFILE *fp, GAME_INFO *game_info)
if (!Savegame_BSON_LoadResumeInfo( if (!Savegame_BSON_LoadResumeInfo(
json_object_get_array(root_obj, "current_info"), json_object_get_array(root_obj, "current_info"),
game_info->current)) { game_info->current)) {
LOG_WARNING("Failed to load RESUME_INFO current properly. Checking if " LOG_WARNING(
"save is legacy."); "Failed to load RESUME_INFO current properly. "
"Checking if save is legacy.");
// Check for 2.6 and 2.7 legacy start and end info. // Check for 2.6 and 2.7 legacy start and end info.
if (!Savegame_BSON_LoadDiscontinuedStartInfo( if (!Savegame_BSON_LoadDiscontinuedStartInfo(
json_object_get_array(root_obj, "start_info"), game_info)) { json_object_get_array(root_obj, "start_info"), game_info)) {
@ -1433,8 +1434,9 @@ bool Savegame_BSON_LoadOnlyResumeInfo(MYFILE *fp, GAME_INFO *game_info)
if (!Savegame_BSON_LoadResumeInfo( if (!Savegame_BSON_LoadResumeInfo(
json_object_get_array(root_obj, "current_info"), json_object_get_array(root_obj, "current_info"),
game_info->current)) { game_info->current)) {
LOG_WARNING("Failed to load RESUME_INFO current properly. Checking if " LOG_WARNING(
"save is legacy."); "Failed to load RESUME_INFO current properly. Checking if "
"save is legacy.");
// Check for 2.6 and 2.7 legacy start and end info. // Check for 2.6 and 2.7 legacy start and end info.
if (!Savegame_BSON_LoadDiscontinuedStartInfo( if (!Savegame_BSON_LoadDiscontinuedStartInfo(
json_object_get_array(root_obj, "start_info"), game_info)) { json_object_get_array(root_obj, "start_info"), game_info)) {

View file

@ -489,8 +489,8 @@ void Sound_ResetEffects(void)
int32_t mode = s->flags & 3; int32_t mode = s->flags & 3;
if (mode == SOUND_MODE_AMBIENT) { if (mode == SOUND_MODE_AMBIENT) {
if (m_AmbientLookupIdx >= MAX_AMBIENT_FX) { if (m_AmbientLookupIdx >= MAX_AMBIENT_FX) {
Shell_ExitSystem("Ran out of ambient fx slots in " Shell_ExitSystem(
"Sound_ResetEffects()"); "Ran out of ambient fx slots in Sound_ResetEffects()");
} }
m_AmbientLookup[m_AmbientLookupIdx] = i; m_AmbientLookup[m_AmbientLookupIdx] = i;
m_AmbientLookupIdx++; m_AmbientLookupIdx++;

View file

@ -575,14 +575,13 @@ static int S_FMV_DecoderDecodeFrame(Decoder *d, AVFrame *frame, AVSubtitle *sub)
: (d->pkt->data ? AVERROR(EAGAIN) : AVERROR_EOF); : (d->pkt->data ? AVERROR(EAGAIN) : AVERROR_EOF);
} }
av_packet_unref(d->pkt); av_packet_unref(d->pkt);
} else if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) {
LOG_ERROR(
"Receive_frame and send_packet both returned EAGAIN, "
"which is an API violation.");
d->packet_pending = true;
} else { } else {
if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) { av_packet_unref(d->pkt);
LOG_ERROR("Receive_frame and send_packet both returned EAGAIN, "
"which is an API violation.");
d->packet_pending = true;
} else {
av_packet_unref(d->pkt);
}
} }
} }
} }