Commit b53a783 1 parent 4641db6 commit b53a783 Copy full SHA for b53a783
File tree 3 files changed +3
-20
lines changed
3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change 9
9
10
10
void cmdplay::ConsoleUtils::SetCursorPosition (int x, int y)
11
11
{
12
- #ifdef mac
13
- // The ANSI escape code to move the cursor is "\033[y;xH"
14
- // So we can print this string with x and y replaced by the function's parameters
15
12
std::cout << " \033 [" << y << " ;" << x << " H" ;
16
- #else
17
- COORD pos = { static_cast <short >(x), static_cast <short >(y) };
18
- HANDLE output = GetStdHandle (STD_OUTPUT_HANDLE);
19
- SetConsoleCursorPosition (output, pos);
20
- #endif
21
13
}
22
14
23
15
void cmdplay::ConsoleUtils::GetWindowSize (int * width, int * height)
@@ -57,13 +49,4 @@ void cmdplay::ConsoleUtils::ShowConsoleCursor(bool show)
57
49
cursorInfo.bVisible = show;
58
50
SetConsoleCursorInfo (out, &cursorInfo);
59
51
#endif
60
- }
61
-
62
- bool cmdplay::ConsoleUtils::GetWindowFocused ()
63
- {
64
- #ifdef mac
65
- return true ;
66
- #else
67
- return GetConsoleWindow () == GetForegroundWindow ();
68
- #endif
69
- }
52
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,5 @@ namespace cmdplay
7
7
static void SetCursorPosition (int x, int y);
8
8
static void GetWindowSize (int * width, int * height);
9
9
static void ShowConsoleCursor (bool show);
10
- static bool GetWindowFocused ();
11
10
};
12
11
}
Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
#include < stdint.h>
3
+
3
4
namespace cmdplay
4
5
{
5
6
namespace video
@@ -28,7 +29,7 @@ namespace cmdplay
28
29
29
30
~DecodedFrame ()
30
31
{
31
- delete m_data;
32
+ delete[] m_data;
32
33
}
33
34
};
34
35
}
You can’t perform that action at this time.
0 commit comments