GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Persist screen resolution by morganchristiansson · Pull Request #44 · Return-To-The-Roots/s25edit

Conversation

@morganchristiansson

@morganchristiansson morganchristiansson commented Jun 21, 2026

Copy link
Copy Markdown
Contributor
$ cat ~/.s25rttr/s25edit.ini 
[editor]
width=800
height=600
fullscreen=0

Also increase resolution list height and add 4K UHD.
image
Fixes #20

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
morganchristiansson added 3 commits June 21, 2026 23:18
@morganchristiansson
Persist screen resolution
b8a6051
@morganchristiansson
Increase resolution list height
7b2419e
@morganchristiansson
Add 4K UHD resolution
5d48e1a
Flow86
Flow86 reviewed Jun 22, 2026
View reviewed changes
Comment thread CGame.cpp Outdated
libsiedler2::Archiv settings;
if(libsiedler2::Load(settingsPath, settings) != 0)
return;
const auto* ini = static_cast<const libsiedler2::ArchivItem_Ini*>(settings.find("editor"));

@Flow86 Flow86 Jun 22, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be a dynamic_cast here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@morganchristiansson morganchristiansson Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thank you for your review!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Flow86
Flow86 reviewed Jun 22, 2026
View reviewed changes
Comment thread CGame.cpp Outdated
libsiedler2::Archiv settings;
settings.alloc(1);
settings.set(0, std::make_unique<libsiedler2::ArchivItem_Ini>("editor"));
auto* ini = static_cast<libsiedler2::ArchivItem_Ini*>(settings.find("editor"));

@Flow86 Flow86 Jun 22, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Flamefire Flamefire Jun 23, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not required here as you just put that one in. So this cannot fail. It could use a dynamic cast with a reference to make that clear(er), but not so important

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@morganchristiansson morganchristiansson Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@morganchristiansson
dynamic_cast ArchivItem_Ini
1e1fdcc
Flamefire
Flamefire reviewed Jun 23, 2026
View reviewed changes
Comment thread CGame.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

morganchristiansson and others added 2 commits June 23, 2026 14:53
@morganchristiansson @Flamefire
Replace alloc(1)+set() with push()
97feec2
Co-authored-by: Alexander Grund <[email protected]>
@morganchristiansson
Merge remote-tracking branch 'upstream/master' into save-screen-resol…
151e8d2
…ution
Flamefire
Flamefire reviewed Jun 23, 2026
View reviewed changes
Comment thread CGame.cpp Outdated
return;
GameResolution.x = ini->getValue("width", static_cast<int>(GameResolution.x));
GameResolution.y = ini->getValue("height", static_cast<int>(GameResolution.y));
fullscreen = ini->getValue("fullscreen", static_cast<int>(fullscreen)) != 0;

@Flamefire Flamefire Jun 23, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fullscreen = ini->getValue("fullscreen", static_cast<int>(fullscreen)) != 0;
fullscreen = ini->getValue("fullscreen", fullscreen);

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@morganchristiansson morganchristiansson Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@morganchristiansson
Simplify fullscreen load; use ref cast in SaveSettings
e27ffde
Flamefire
Flamefire approved these changes Jun 23, 2026
View reviewed changes
@Flamefire
Flamefire merged commit 9800519 into Return-To-The-Roots:master Jun 23, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@morganchristiansson morganchristiansson mentioned this pull request Jun 27, 2026
Make the editor window resizable and fill it with the (wrapping) map #51
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Flow86 Flow86 Flow86 left review comments
@Flamefire Flamefire Flamefire approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Save resolution

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@morganchristiansson @Flamefire @Flow86
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.