mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-11 02:41:35 -10:00
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
13 lines
263 B
C++
13 lines
263 B
C++
#include "platform/ctr/display.hpp"
|
|
#include <SDL.h>
|
|
|
|
#include <cstdint>
|
|
uint32_t Get3DSScalingFlag(bool fitToScreen, int width, int height)
|
|
{
|
|
if (fitToScreen)
|
|
return SDL_FULLSCREEN;
|
|
if (width * 3 < height * 5)
|
|
return SDL_FITHEIGHT;
|
|
return SDL_FITWIDTH;
|
|
}
|