Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Dec 22, 2024
1 parent df257c7 commit d745186
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/Shared/IO/BoundedFileStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ namespace Death { namespace IO {
DEATH_ASSERT(destination != nullptr, "destination is null", 0);

std::int64_t pos = _underlyingStream.GetPosition() - _offset;
if (bytesToRead > _size - pos) {
bytesToRead = _size - pos;
if (bytesToRead > static_cast<std::int64_t>(_size) - pos) {
bytesToRead = static_cast<std::int64_t>(_size) - pos;
}

return _underlyingStream.Read(destination, bytesToRead);
Expand Down
2 changes: 1 addition & 1 deletion Sources/Shared/IO/FileStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace Death { namespace IO {
}
} else if (oldPos - _readPos <= pos && pos < oldPos + _readLength - _readPos) {
// Some part of the buffer is still valid
std::int64_t diff = (pos - oldPos);
std::int32_t diff = static_cast<std::int32_t>(pos - oldPos);
_readPos += diff;
// Seek after the buffered part, so the position is still correct
if (SeekInternal(_readLength - _readPos, SeekOrigin::Current) < 0) {
Expand Down
2 changes: 2 additions & 0 deletions Sources/nCine/Backends/SdlGfxDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ namespace nCine

void SdlGfxDevice::initGraphics(bool enableWindowScaling)
{
#if defined(SDL_HINT_APP_NAME)
SDL_SetHint(SDL_HINT_APP_NAME, NCINE_APP_NAME);
#endif

#if SDL_VERSION_ATLEAST(2, 24, 0) && defined(SDL_HINT_WINDOWS_DPI_SCALING)
// Scaling is handled automatically by SDL (since v2.24.0)
Expand Down

0 comments on commit d745186

Please sign in to comment.