diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-05-10 14:15:04 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-05-10 14:20:32 -0400 |
commit | dccefed038b63d718deb0d6046d8a72b3d1151f5 (patch) | |
tree | e13b2a0f0595a6ff8b50b81e37a8c41ad96237d0 /src/frontend/mame/ui/dirmenu.h | |
parent | 2b94a4a300951fd79711ac83fc4f169a25e8d539 (diff) |
Fix bug that permanently disabled some UI search strings when they were cleared
(nw) This adopts std::string::clear() and empty() consistently, rather than storing and checking for NUL as with C-style buffers. This fixes issue #2295 and probably other unreported bugs afflicting UI search text input.
Diffstat (limited to 'src/frontend/mame/ui/dirmenu.h')
-rw-r--r-- | src/frontend/mame/ui/dirmenu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/dirmenu.h b/src/frontend/mame/ui/dirmenu.h index 5d092273b1c..d887dd58231 100644 --- a/src/frontend/mame/ui/dirmenu.h +++ b/src/frontend/mame/ui/dirmenu.h @@ -100,7 +100,7 @@ public: protected: virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; - virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + virtual bool menu_has_search_active() override { return !m_search.empty(); } private: virtual void populate(float &customtop, float &custombottom) override; |