@@ -838,6 +838,7 @@ MainApp::OnDropFiles(HDROP hDrop)
838
838
if (APS_Playing == mAviPlayState ) {
839
839
mAviReader .Close ();
840
840
mAviPlayState = APS_PreInit;
841
+ mState = S_Init;
841
842
}
842
843
843
844
if (0 == _wcsicmp (L" .avi" , &path[sz - 4 ])) {
@@ -1297,6 +1298,7 @@ MainApp::ShowSettingsWindow(void) {
1297
1298
1298
1299
ImGui::Text (" ALT+Enter to toggle fullscreen." );
1299
1300
ImGui::Text (" F7 to show/hide UI." );
1301
+ ImGui::Text (" Drop file to display it." );
1300
1302
1301
1303
switch (mState ) {
1302
1304
case S_Init:
@@ -1305,8 +1307,11 @@ MainApp::ShowSettingsWindow(void) {
1305
1307
case S_ImageViewing:
1306
1308
ImGui::Text (" Image loaded." );
1307
1309
break ;
1310
+ case S_VideoViewing:
1311
+ ImGui::Text (" Video viewing." );
1312
+ break ;
1308
1313
case S_Capturing:
1309
- ImGui::Text (" Captureing ." );
1314
+ ImGui::Text (" Video Capturing ." );
1310
1315
break ;
1311
1316
default :
1312
1317
assert (0 );
@@ -1422,18 +1427,6 @@ MainApp::ShowSettingsWindow(void) {
1422
1427
}
1423
1428
}
1424
1429
1425
- if (ImGui::TreeNodeEx (" Image Quantization Range (Set Full for HDR)" , ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_CollapsingHeader)) {
1426
- int cg = 0 != (mShaderConsts .flags & MLColorConvShaderConstants::FLAG_LimitedRange);
1427
- ImGui::RadioButton (" Full ##ICG" , &cg, 0 );
1428
- ImGui::RadioButton (" Limited ##ICG" , &cg, 1 );
1429
-
1430
- if (cg) {
1431
- mShaderConsts .flags |= MLColorConvShaderConstants::FLAG_LimitedRange;
1432
- } else {
1433
- mShaderConsts .flags = mShaderConsts .flags & (~MLColorConvShaderConstants::FLAG_LimitedRange);
1434
- }
1435
- }
1436
-
1437
1430
if (ImGui::TreeNodeEx (" Image Color Gamut" , ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_CollapsingHeader)) {
1438
1431
// ImGui::Text("Color Gamut is %s", MLColorGamutToStr(img.colorGamut));
1439
1432
@@ -1454,6 +1447,18 @@ MainApp::ShowSettingsWindow(void) {
1454
1447
}
1455
1448
}
1456
1449
1450
+ if (ImGui::TreeNodeEx (" Image Quantization Range (Set Full for HDR)" , ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_CollapsingHeader)) {
1451
+ int cg = 0 != (mShaderConsts .flags & MLColorConvShaderConstants::FLAG_LimitedRange);
1452
+ ImGui::RadioButton (" Full ##ICG" , &cg, 0 );
1453
+ ImGui::RadioButton (" Limited ##ICG" , &cg, 1 );
1454
+
1455
+ if (cg) {
1456
+ mShaderConsts .flags |= MLColorConvShaderConstants::FLAG_LimitedRange;
1457
+ } else {
1458
+ mShaderConsts .flags = mShaderConsts .flags & (~MLColorConvShaderConstants::FLAG_LimitedRange);
1459
+ }
1460
+ }
1461
+
1457
1462
ImGui::End ();
1458
1463
}
1459
1464
@@ -1692,6 +1697,7 @@ MainApp::ShowAviPlaybackWindow(void) {
1692
1697
mAviImgBuf = nullptr ;
1693
1698
mAviImgBuf = new uint8_t [mAviImgBufBytes ];
1694
1699
mAviPlayState = APS_Playing;
1700
+ mState = S_VideoViewing;
1695
1701
}
1696
1702
} else {
1697
1703
sprintf_s (mPlayMsg , " Read AVI Failed.\n File open error : %S" , mAviFilePath );
@@ -1746,6 +1752,7 @@ MainApp::ShowAviPlaybackWindow(void) {
1746
1752
if (ImGui::Button (" Close" )) {
1747
1753
mAviReader .Close ();
1748
1754
mAviPlayState = APS_PreInit;
1755
+ mState = S_Init;
1749
1756
}
1750
1757
}
1751
1758
0 commit comments