Skip to content

Conversation

Copy link

Copilot AI commented Oct 31, 2025

In DisplaySettings::Request(), if setAllmEnabled() throws an exception, setAVIContentType() and setAVIScanInformation() are never called due to incorrect ordering.

Changes

  • Moved setAllmEnabled() call to execute after setAVIContentType() and setAVIScanInformation() in the Request() method

Before:

bool enable = (newState == "GAME") ? true : false;
vPort.getDisplay().setAllmEnabled(enable);
if(enable){
    vPort.getDisplay().setAVIContentType(dsAVICONTENT_TYPE_GAME);
    vPort.getDisplay().setAVIScanInformation(dsAVI_SCAN_TYPE_UNDERSCAN);
}else{
    vPort.getDisplay().setAVIContentType(dsAVICONTENT_TYPE_NOT_SIGNALLED);
    vPort.getDisplay().setAVIScanInformation(dsAVI_SCAN_TYPE_NO_DATA);
}

After:

bool enable = (newState == "GAME") ? true : false;
if(enable){
    vPort.getDisplay().setAVIContentType(dsAVICONTENT_TYPE_GAME);
    vPort.getDisplay().setAVIScanInformation(dsAVI_SCAN_TYPE_UNDERSCAN);
}else{
    vPort.getDisplay().setAVIContentType(dsAVICONTENT_TYPE_NOT_SIGNALLED);
    vPort.getDisplay().setAVIScanInformation(dsAVI_SCAN_TYPE_NO_DATA);
}
vPort.getDisplay().setAllmEnabled(enable);
Original prompt

On DisplaySettings.cpp, in DisplaySettings::Request() function setAllmEnabled() should be called after setAVIContentType() and setAVIScanInformation() are called. otherwise if setAllmEnabled() has an exception, the other two function are not called either.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix call order in DisplaySettings::Request function Fix exception handling in DisplaySettings::Request() by reordering function calls Oct 31, 2025
Copilot AI requested a review from goruklu October 31, 2025 03:50
@goruklu goruklu marked this pull request as ready for review October 31, 2025 03:55
Copilot AI review requested due to automatic review settings October 31, 2025 03:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a potential issue in the DisplaySettings module where an exception in setAllmEnabled() would prevent the execution of setAVIContentType() and setAVIScanInformation(). By reordering these function calls, the critical AVI configuration methods are guaranteed to execute before the potentially failing setAllmEnabled() call.

Key Changes:

  • Moved setAllmEnabled() call to execute after the AVI-related function calls in the game mode state handling logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@goruklu goruklu changed the title Fix exception handling in DisplaySettings::Request() by reordering function calls SERXIONE-8115: Fix exception handling in DisplaySettings::Request() by reordering function calls Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants