Skip to content

Commit

Permalink
Add prompt for pressing Enter to exit the program
Browse files Browse the repository at this point in the history
  • Loading branch information
Exkywor committed May 26, 2021
1 parent d76eb9a commit 1ed58cf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.2 - 2021-05-26
- The monkeys in my brain that made me forget to add a prompt to exit the program have been taken care of. Now, after displaying the results, the tool properly awaits for the user to press Enter to exit.
## 1.0.1 - 2021-05-25

- Improved user prompts and result styles.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Rotation: 0.00 25.35 -113.74
```

## Important
As version 1.0.1, the input is not validated. However, there should be no issues as long as you input numerical values when prompted.
As version 1.0.2, the input is not validated. However, there should be no issues as long as you input numerical values when prompted.
10 changes: 5 additions & 5 deletions res/INFO.rc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
img ICON "./me3.ico"

1 VERSIONINFO
FILEVERSION 1,0,1,0
PRODUCTVERSION 1,0,1,0
FILEVERSION 1,0,2,0
PRODUCTVERSION 1,0,2,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "Calculate Mass Effect camera motion values"
VALUE "FileVersion", "1.0.1"
VALUE "OriginalFilename", "MECamCalc_1.0.1.exe"
VALUE "FileVersion", "1.0.2"
VALUE "OriginalFilename", "MECamCalc_1.0.2.exe"
VALUE "ProductName", "Mass Effect Camera Motion Calculator"
VALUE "ProductVersion", "1.0.1"
VALUE "ProductVersion", "1.0.2"
END
END
BLOCK "VarFileInfo"
Expand Down
Binary file modified res/info.res
Binary file not shown.
7 changes: 7 additions & 0 deletions src/MECamCalc.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ int main() {
printVals(rotE);
printf("\n");

fflush(stdin);
int prompt;
do {
printf("Press Enter to exit the program");
prompt = getchar();
} while (prompt != '\n' && prompt != EOF);

return 0;
}

Expand Down

0 comments on commit 1ed58cf

Please sign in to comment.