Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 增加与 getch_console 配套的 kbhit_console #235

Merged
merged 2 commits into from
Oct 12, 2024

Conversation

yixy-only
Copy link
Collaborator

No description provided.

@yixy-only yixy-only self-assigned this Oct 8, 2024
@wysaid
Copy link
Owner

wysaid commented Oct 9, 2024

虽然能理解... 但也感觉怪怪的... 因为 getch 本来就是 C 函数, 现在的情况是, 新版本把 getch 定义为另一个窗口里面获取字符串的, 然后又定义了另一个 getch_console 来代替原本的 getch...
如果恢复 getch 成 console 的, 然后新增一个 ege_getch 是不是更合适.... 但似乎又会带来兼容性问题... 唉...
好像也只能按你这个改了...

@yixy-only
Copy link
Collaborator Author

虽然能理解... 但也感觉怪怪的... 因为 getch 本来就是 C 函数, 现在的情况是, 新版本把 getch 定义为另一个窗口里面获取字符串的, 然后又定义了另一个 getch_console 来代替原本的 getch... 如果恢复 getch 成 console 的, 然后新增一个 ege_getch 是不是更合适.... 但似乎又会带来兼容性问题... 唉... 好像也只能按你这个改了...

@wysaid 历史太久了,ege 占了 <conio.h> 的 getch 和 kbhit 名字,导致同一个源文件里没法用控制台的 getch 和 kbhit 。ege 大部分代码都有 getch(),改回去会出大问题,只能另外搞一个给控制台用了

@wysaid
Copy link
Owner

wysaid commented Oct 10, 2024

要不...也加一个 ege_getch 和 ege_kbhit
然后保留原来的 getch 啥的, 后面写代码的时候也可以好好区分下。

@yixy-only yixy-only requested a review from wysaid October 10, 2024 11:56
@wysaid wysaid merged commit e004364 into wysaid:master Oct 12, 2024
1 check passed
@yixy-only yixy-only deleted the feat_kbhit_console branch October 13, 2024 14:02
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